API referenceForms

pdfSetCheckBoxDefState

Get/set a checkbox's /DV default checked state

C
int32_t __stdcall pdfGetCheckBoxDefState(PPDF IPDF, uint32_t AField);
BOOL32 __stdcall pdfSetCheckBoxDefState(PPDF IPDF, uint32_t AField, BOOL32 Checked);
BOOL32 __stdcall pdfSetCheckBoxState(PPDF IPDF, uint32_t AField, BOOL32 Checked);
Delphi
function pdfGetCheckBoxDefState(const IPDF: PPDF; AField: Cardinal): Integer; stdcall;
function pdfSetCheckBoxDefState(const IPDF: PPDF; AField: Cardinal; Checked: LongBool): LongBool; stdcall;
function pdfSetCheckBoxState(const IPDF: PPDF; AField: Cardinal; Checked: LongBool): LongBool; stdcall;

Purpose. Get/set a checkbox's /DV default checked state (*DefState) versus its /V (and /AS) current checked state (pdfSetCheckBoxState).

Parameters.

ParameterDescription
IPDFDocument handle.
AFieldTarget checkbox field handle.
Checked*(Set only)* New state.

Return value. Getter: 1/0 for checked/unchecked; 0 if AField doesn't resolve (indistinguishable from a genuinely unchecked default in that respect). Setters: True on success.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Forms
Category

Setters

Exported names

pdfSetCheckBoxDefState

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.