Posted 28 May 2024, 5:32 pm EST
With the ITextMap and the annotation giving us a Rect and PdfRect, this would appear to be easy to do, but I’m having trouble.
First, the code example for GetFragment appears to have a typo or two…and that is one thing that is tripping me up…the HitTest rectangle definition.
Also, if I’m reading it correctly the HitTest/TextMap uses top-left 0, not Pdf coordinates? Do I still need to multiply the dpi into these coordinates? There’s a lot of missing information in the docs.
Still, this should be pretty easy since the annotation supplies both Rect and PdfRect information.
Can anyone help me with a code snippet using an annotation’s coordinates to see if the Page’s TextMap has any text within the boundaries?
Thanks.