pdfGetAnnotCount
Return the total number of annotations across every page
int32_t __stdcall pdfGetAnnotCount(PPDF IPDF);
function pdfGetAnnotCount(const IPDF: PPDF): Integer; stdcall;
Purpose. Return the total number of annotations across every page in the document.
Description. Sums CreatedAnnots.Count over every page — not FAnnotByHandle.Count. These two counts can diverge: pdfDeleteAnnotationFromPage (below) removes an annotation from a page's list (decrementing this count) without removing its entry from FAnnotByHandle, so a handle can remain resolvable via pdfGetAnnot for an annotation this count no longer includes.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Return value. The total per-page annotation count summed across the document; 0 if IPDF is invalid.
See also. pdfGetPageAnnotCount (the current-page-only counterpart).
C# (P/Invoke)
public static extern int pdfGetAnnotCount(IntPtr IPDF);
Annotations
pdfGetAnnotCount
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.