API referenceForms

pdfGetFieldExpValCount

pdfGetFieldExpValue reads the checkbox/radio-button

C
int32_t __stdcall pdfGetFieldExpValue(PPDF IPDF, uint32_t AField, const char* Value);
BOOL32 __stdcall pdfGetFieldExpValueEx(PPDF IPDF, uint32_t AField, uint32_t ValIndex, const char* Value, const char* ExpValue, BOOL32* Selected);
int32_t __stdcall pdfGetFieldExpValCount(PPDF IPDF, uint32_t AField);
Delphi
function pdfGetFieldExpValue(const IPDF: PPDF; AField: Cardinal; var Value: PAnsiChar): Integer; stdcall;
function pdfGetFieldExpValueEx(const IPDF: PPDF; AField: Cardinal; ValIndex: Cardinal; var Value, ExpValue: PAnsiChar; var Selected: LongBool): LongBool; stdcall;
function pdfGetFieldExpValCount(const IPDF: PPDF; AField: Cardinal): Integer; stdcall;

Purpose. pdfGetFieldExpValue reads the checkbox/radio-button export value for AField (a single-value, not indexed, form of the lookup); pdfGetFieldExpValueEx reads one indexed /Opt pair from a Choice field, additionally reporting whether it's currently selected; pdfGetFieldExpValCount returns the total /Opt entry count.

Parameters.

ParameterDescription
IPDFDocument handle.
AFieldTarget field handle.
ValIndex*(Ex only)* 0-based /Opt index.
Value, ExpValueOutput only, disguised-input C declarations.
Selected*(Ex only)* Output: whether this option is currently the field's value.

Return value. pdfGetFieldExpValue: value length; 0 if AField doesn't resolve. pdfGetFieldExpValueEx: True if AField/ValIndex resolve. pdfGetFieldExpValCount: the /Opt count; 0 if AField doesn't resolve.

C# (P/Invoke)

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

Forms

Exported names

pdfGetFieldExpValCount

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.