Acrobat is showing file paths that match my computer, but PDFNet does not.

12 views
Skip to first unread message

Ryan

unread,
May 2, 2016, 9:06:22 PM5/2/16
to PDFTron PDFNet SDK
Question:

The function GetAsPDFText does not report the same text, that Acrobat shows in their tooltip, when you hover over a link annotation.

Answer:

The PDF in question has Link annots with relative computer files paths, such as "../../../Downloads/my%20file%20name.exe".

When you open the PDF in the following fictional folder "c:\folder\where\the\pdf\is\located", and view in Acrobat, the tooltip shows something like "file:///c|/folder/where/the/Downloads/my%20file%20name.exe"

In otherwords, Acrobat is taking the current working directory, or the actual folder of the PDF, and pre-pending to the relative path.

You can do this in your own viewer, as GetAsPDFText is returning the relative path actually stored in the PDF.

Of course, this will almost never actually work, as it depends highly on the computer that created it.
Reply all
Reply to author
Forward
0 new messages