API referenceForms

pdfGetFieldFlags

Get/set the field's /Ff flags bitmask (ReadOnly/Required/

C
int32_t __stdcall pdfGetFieldFlags(PPDF IPDF, uint32_t AField);
BOOL32 __stdcall pdfSetFieldFlags(PPDF IPDF, uint32_t AField, int32_t Flags, BOOL32 Reset);
Delphi
function pdfGetFieldFlags(const IPDF: PPDF; AField: Cardinal): Integer; stdcall;
function pdfSetFieldFlags(const IPDF: PPDF; AField: Cardinal; Flags: Integer; Reset: LongBool): LongBool; stdcall;

Purpose. Get/set the field's /Ff flags bitmask (ReadOnly/Required/ NoExport/Multiline/Password/etc, per field type).

Description. Reset is genuinely honored — a real, meaningful contrast to pdfSetGStateFlags's silently-dropped Reset parameter (Line Style, Opacity, and Graphics-State Flags): Reset = True clears the field's prior /Ff value before OR-ing in Flags (a true replace); Reset = False OR-merges Flags into the existing bitmask, preserving previously-set bits not present in the new Flags value. This confirms the Reset-parameter pattern is not universally dropped across this SDK — it depends on the specific function.

Parameters.

ParameterDescription
IPDFDocument handle.
AFieldTarget field handle.
FlagsThe bits to apply.
ResetTrue = replace the entire /Ff value with Flags; False = OR-merge Flags into the existing value.

Return value. pdfGetFieldFlags: the current /Ff value; 0 if IPDF invalid. pdfSetFieldFlags: True if AField resolves.

See also. pdfSetGStateFlags (the contrasting sibling where Reset is dropped).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetFieldFlags(IntPtr IPDF, uint AField);
Area
Forms
Category

Forms

Exported names

pdfGetFieldFlags

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.