API referenceForms

pdfCheckFieldNames

Validate the document's field-name structure (e.g.

C
int32_t __stdcall pdfCheckFieldNames(PPDF IPDF);
Delphi
function pdfCheckFieldNames(const IPDF: PPDF): Integer; stdcall;

Purpose. Validate the document's field-name structure (e.g. detecting name collisions or malformed fully-qualified names across the field tree).

Description. Real (CheckFieldNamesH); notably returns -1, not 0, when the document has no fields at all — an explicit documented DIFF from the classic API's convention ("dyna returns -1 with no fields") — so a caller distinguishing "no fields to check" from "fields checked, all valid" must treat -1 specially, not assume it means failure.

Return value. A defect count if fields exist; -1 if the document has zero fields (not a failure — see description); 0 if IPDF is invalid or every existing field name is valid (these two 0 cases are not distinguishable from the return value alone).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCheckFieldNames(IntPtr IPDF);
Area
Forms
Category

Validation

Exported names

pdfCheckFieldNames

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.