AnnotAtPagePoint
Viewer interaction, annotations and hotspot links
Description
Finds the topmost annotation of any subtype covering the given point on a page and reports its subtype name
Popup annotations are skipped by the underlying hit test; the coordinates use the page user space in which GetAnnotRectEx-style helpers of the underlying library report rectangles
Syntax
Delphi
Function TPDFlibViewer.AnnotAtPagePoint(APage: Integer; XPos, YPos: Double; Out Subtype: WideString): Integer;Parameters
| APage | One-based page index |
|---|---|
| XPos, YPos | Point in page user-space coordinates |
| Subtype | Receives the annotation subtype name such as Text or FileAttachment, empty when nothing was hit |
Return values
| 0 | No annotation covers the point, the page is invalid or no library is loaded |
|---|---|
| Positive value | One-based annotation index of the topmost hit |
See also
TPDFlibViewer, LinkActionAtPagePoint, FormFieldAtPagePoint, RegionAtClientPoint, GetAnnotRectEx