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

APageOne-based page index
XPos, YPosPoint in page user-space coordinates
SubtypeReceives the annotation subtype name such as Text or FileAttachment, empty when nothing was hit

Return values

0No annotation covers the point, the page is invalid or no library is loaded
Positive valueOne-based annotation index of the topmost hit

See also

TPDFlibViewer, LinkActionAtPagePoint, FormFieldAtPagePoint, RegionAtClientPoint, GetAnnotRectEx