BOOL32 __stdcall pdfGetTextFieldValue(PPDF IPDF, uint32_t AField, const char* Value, BOOL32* ValIsUnicode, const char* DefValue, BOOL32* DefValIsUnicode);
function pdfGetTextFieldValue(const IPDF: PPDF; AField: Cardinal; var Value: PAnsiChar; var ValIsUnicode: LongBool; var DefValue: PAnsiChar; var DefValIsUnicode: LongBool): LongBool; stdcall;
Purpose. Read a text field's current (/V) and default (/DV) values.
Description. **Value/DefValue are output-only var PAnsiChar despite their misleading const char* C declarations (the established disguised-output pattern). Both ValIsUnicode and DefValIsUnicode are always forced False** — QueryTextFieldValue only exposes a narrow (ANSI) form regardless of the field's actual stored encoding, the same one-sided-Unicode limitation already confirmed for pdfGetJavaScript (JavaScript, FDF Import, Usage Rights, and Custom Data) and pdfGetFieldMapName (Field Naming, Identity, and Flags).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
AField | Target field handle. |
Value, DefValue | Output only. |
ValIsUnicode, DefValIsUnicode | Output: always False. |
Return value. True if AField resolves; False otherwise.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetTextFieldValue
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.