pdfGetAnnotEx
Read an annotation's core metadata (type, bounding box) by its
BOOL32 __stdcall pdfGetAnnot(PPDF IPDF, uint32_t Handle, TPDFAnnotation* Annot);
BOOL32 __stdcall pdfGetAnnotEx(PPDF IPDF, uint32_t Handle, TPDFAnnotationEx* Annot);
function pdfGetAnnot(const IPDF: PPDF; Handle: Cardinal; var Annot: TPDFAnnotation): LongBool; stdcall;
function pdfGetAnnotEx(const IPDF: PPDF; Handle: Cardinal; var Annot: TPDFAnnotationEx): LongBool; stdcall;
Purpose. Read an annotation's core metadata (type, bounding box) by its document-wide handle, from any page.
Description. pdfGetAnnot resolves Handle through FAnnotByHandle (GetAnnotFull) — works regardless of which page is currently open. pdfGetAnnotEx additionally exposes a GAP-7-style object-descriptor handle (Annot.InkList) for Ink annotations specifically (AnnotType = atInk, type code 5): it sums every stroke's point count across the annotation's ink list and, if non-zero, mints a descriptor consumable elsewhere for detailed per-stroke point readback — for every other annotation type, InkList/InkListCount are left nil/0.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Handle | Document-wide annotation handle. |
Annot | Output: type, bounding box (and, Ex+Ink only, the ink-list descriptor). |
Return value. True if Handle resolves; False otherwise (Ex specifically fails when the resolved type code is 24, atUnknown).
See also. pdfGetPageAnnot (the unrelated, index-based enumeration mechanism).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Annotations
pdfGetAnnotEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.