PDF Link coordinate not correct?
-
26-05-2021 - |
Question
Please refer to Get PDF hyperlinks on iOS with Quartz
It explained an algorithm to find the the pdf hyperlink and its coordinate.I followed this post and write my own pdf reader. It works well for most of the pdf files but not for one pdf file. The problem is the coordinate of the hyperlink is not correct.
Here is the pdf I created the hyperlink:
I created a hyperlink from Adobe acrobat 10.0. The origin of this hyperlink is almost at (0,0).Then I use the algorithm to parse my pdf file. To my surprise the result rect is:
link rect = {{63, 123}, {173, -158}}
So when I render this rect in screen, it's something like this:
What could be reason? Can anybody advise? Thanks
By the way, if there is a way to upload my sample pdf file here?
Solution
Have you allowed for a cropbox?