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);
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.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
AField | Target field handle. |
ValIndex | *(Ex only)* 0-based /Opt index. |
Value, ExpValue | Output 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)
[return: MarshalAs(UnmanagedType.Bool)]
Forms
pdfGetFieldExpValueEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.