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
| Index | The index of the annotation on the currently selected page. The first annotation has an index of 1 |
|---|---|
| Left | Receives the horizontal position of the left edge in page units |
| Top | Receives the vertical position of the top edge in page units |
| Width | Receives the width of the rectangle in page units |
| Height | Receives the height of the rectangle in page units |
Return values
| 1 | The rectangle was read and returned through the output parameters |
|---|---|
| 0 | No 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