API referenceCore SDK

pdfGetDocumentID

Return a deterministic 32-bit integer derived from the

C
int32_t __stdcall pdfGetDocumentID(PPDF IPDF, int32_t Index);
Delphi
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.

ParameterDescription
IPDFDocument handle.
IndexWhich /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)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetDocumentID(IntPtr IPDF, int Index);
Area
Core SDK
Category

Getters

Exported names

pdfGetDocumentID

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.