int32_t __stdcall pdfGetFieldType(PPDF IPDF, uint32_t AField);
int32_t __stdcall pdfGetFieldGroupType(PPDF IPDF, uint32_t AField);
function pdfGetFieldType(const IPDF: PPDF; AField: Cardinal): Integer; stdcall;
function pdfGetFieldGroupType(const IPDF: PPDF; AField: Cardinal): Integer; stdcall;
Purpose. Return a field's TFieldType ordinal (Text/Button/Choice/ Signature/etc).
Description. Verified: pdfGetFieldType and pdfGetFieldGroupType are the literal identical implementation (GetFieldTypeH) — despite the "Group" name suggesting a different, group-node-specific type enumeration, pdfGetFieldGroupType returns exactly the same value as pdfGetFieldType for any field, group node or otherwise. The one observable difference is their invalid-IPDF fallback: pdfGetFieldType returns -1 when IPDF is invalid, while pdfGetFieldGroupType returns 0 in the same case — a minor but real divergence in error signaling between two otherwise-identical functions.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
AField | Target field handle. |
Return value. The TFieldType ordinal; pdfGetFieldType returns -1 and pdfGetFieldGroupType returns 0 when IPDF is invalid — the only difference between the two.
C# (P/Invoke)
public static extern int pdfGetFieldGroupType(IntPtr IPDF, uint AField);
Forms
pdfGetFieldGroupType
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.