pdfCheckPageAnnots
Scan every page's annotation list for structurally malformed
int32_t __stdcall pdfCheckPageAnnots(PPDF IPDF);
function pdfCheckPageAnnots(const IPDF: PPDF): Integer; stdcall;
Purpose. Scan every page's annotation list for structurally malformed entries (not a resolvable PDF dictionary, or missing the mandatory /Subtype//Rect keys).
Description. Iterates every page's CreatedAnnots, counting an entry as defective if it doesn't support IPdfDict at all, or does but is missing /Subtype or /Rect. This is a pure read-only diagnostic — it does not repair or remove anything it finds; a non-zero result flags a document integrity problem for the caller to investigate separately (e.g. via manual inspection or pdfDeleteAnnotation).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Return value. The count of structurally malformed annotation entries found across the whole document; -1 if IPDF is invalid; 0 means every annotation is structurally sound.
C# (P/Invoke)
public static extern int pdfCheckPageAnnots(IntPtr IPDF);
Validation
pdfCheckPageAnnots
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.