API referenceForms

pdfCreateGroupField

Create a non-terminal field-tree grouping node (/T with

C
int32_t __stdcall pdfCreateGroupField(PPDF IPDF, const char* Name, int32_t Parent);
Delphi
function pdfCreateGroupField(const IPDF: PPDF; const Name: PAnsiChar; Parent: Integer): Integer; stdcall;

Purpose. Create a non-terminal field-tree grouping node (/T with no /FT/widget of its own, existing purely to organize child fields hierarchically — e.g. for shared /DA inheritance or grouped export under a common fully-qualified name).

Description. The one function in this chapter where Parent is genuinely honoredCreateGroupFieldH accepts and uses it, unlike every leaf-field creator above.

Parameters.

ParameterDescription
IPDFDocument handle.
NameThe group's partial field name segment.
ParentGenuinely honored — the new group's parent field handle (or a root sentinel for a top-level group).

Return value. The new group field's handle; 0 if IPDF is invalid.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateGroupField(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string Name, int Parent);
Area
Forms
Category

Object Creation

Exported names

pdfCreateGroupField

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.