How can I change a reference (link to anohter PDF file) to a hyperlink and set its URI for e.g. to google.com
?
A hyperlink and a reference seems to be different objects or rather classes in the iTextSharp library. So there must be some type swichting for the refernce object.
With iTextSharp, I can easily change the URI of hyperlinks, which I found here. But this doesn't work for refernces.
And I didn't find a way to do this with the abcpdf library.
I would need some hints, snippets or a solution based on the usage of the iTextSharp or abcpdf (websupergoo) libraries.
Technical ASCII implementation of the reference and the link:
Reference:
55 0 obj<</F 56 0 R/S/Launch/NewWindow true>>
endobj
56 0 obj<</F(Testdokument_2.pdf)/Type/Filespec>>
endobj
57 0 obj<</Rect[65.0666 447.627 190.233 473.951]/Subtype/Link/BS<</S/S/W1/Type/Border>>/A 59 0 R/C[0.0 1.0 0.0]/H/I/Border[0 0 1]/Type/Annot>>
endobj
Link:
6 0 obj
<</Subtype/Link/Rect[68.6 643.86 93.312 669.3]/BS<</W 0>>/F 4/A<</Type/Action/S/URI/URI(http://www.bing.com/)>>/StructParent 1>>
endobj
Maybe this will help to understand the difference.