[pdftex] Is hyperref link color stored in PDF file annotation data?

Doug McKenna doug at mathemaesthetics.com
Mon Jan 4 00:24:54 CET 2021


Ross - 

>| BTW, it takes rather delicate programming to properly locate where the 
>| annotation rectangle resides on the page. It’s even harder when the 
>| anchor text splits across 2 pages, as then you need to have two 
>| rectangles, 1 for each page. 

Understood. A similar problem occurs when searching for text matches, when the phrase (or even a hyphenated single word) being searched for crosses a page or other document boundary. 

For now, I want only to rely on what Apple's PDFKit lets me access via their official API. Basically, given a point on a PDFPage object, one can retrieve a PDFAnnotation object associated with that point, then query the annotation object for its bounds. For now, it returns a single rectangle, presumably the first of several possible rectangles on different pages, though usually the only rectangle on one page. The "delicacy" of Apple's programming in this situation isn't clear. But for what I'm doing, I've not found any serious problems so far relying on the single bounds returned. 

Doug McKenna 
Mathemaesthetics, Inc. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/pdftex/attachments/20210103/c014074e/attachment.html>


More information about the pdftex mailing list.