GetAnnotRectEx

Annotations and hotspot links

Description

Reads the bounding rectangle of an annotation and returns it decomposed into Left, Top, Width and Height in page units

The corner coordinates of the raw /Rect array are normalized during extraction, so Width and Height never come back negative. The values follow the coordinate origin configured for the document and match the arguments accepted by SetAnnotRect

Syntax

Delphi

Function TPDFlib.GetAnnotRectEx(Index: Integer; Out Left, Top, Width, Height: Double): Integer;

Parameters

IndexThe index of the annotation on the currently selected page. The first annotation has an index of 1
LeftReceives the horizontal position of the left edge in page units
TopReceives the vertical position of the top edge in page units
WidthReceives the width of the rectangle in page units
HeightReceives the height of the rectangle in page units

Return values

1The rectangle was read and returned through the output parameters
0No document is open or Index is less than 1; all four output parameters are set to 0

Remarks

Call SelectPage before using this function; it operates on the annotations of the currently selected page

See also

SetAnnotRect, GetAnnotType, AnnotationCount