int32_t __stdcall pdfGetDocumentID(PPDF IPDF, int32_t Index);
function pdfGetDocumentID(const IPDF: PPDF; Index: Integer): Integer; stdcall;
Purpose. Return a deterministic 32-bit integer derived from the document's /ID array entry at Index — a compact numeric fingerprint, distinct from pdfGetDocumentIdentifier's full hex/raw string form below.
Description. Takes the first 4 bytes of /ID[Index] (big-endian packed into a 32-bit value); an /ID entry shorter than 4 bytes is zero-padded on the low end (missing trailing bytes become 0, not a failure).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Index | Which /ID array entry (0 or 1 — the permanent/changing halves). |
Return value. The derived 32-bit value; 0 if IPDF invalid or no /ID exists yet.
See also. pdfGetDocumentIdentifier.
C# (P/Invoke)
public static extern int pdfGetDocumentID(IntPtr IPDF, int Index);
Getters
pdfGetDocumentID
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.