Q: How do I get the caption of the annotation (i.e. text displayed in
PDF Page for the link) not the actual target URL to which it points?
I need this informtaion for e_Launch ,e_GoToR and e_SubmitForm Action
A: I am not exactly clear regarding the functionality that you are
In case you would like to extract the value of the optional 'Contents'
entry from the annotation dictionary you could use
Alternatively, if you want to extract the text that lies beneath the
annotation you will need to search for text using
samplecode.html#TextExtract). The reason for this is that this
information is not stored in annotations (PDF annotations are
'floating' on top of the page). In this case you can obtain the
annotations rectangle using annot.GetRect() and then search for all
pdftron.PDF.TextExtractor.Word-s that intersect
(word.GetBBox().Intersect()) the annotation rectangle.