C
int32_t __stdcall pdfCreateTextField(PPDF IPDF, const char* Name, int32_t Parent, int32_t Multiline, int32_t MaxLen, double PosX, double PosY, double Width, double Height);
Delphi
function pdfCreateTextField(const IPDF: PPDF; const Name: PAnsiChar; Parent, Multiline, MaxLen: Integer; PosX, PosY, Width, Height: Double): Integer; stdcall;
Purpose. Create a text (/FT /Tx) form field.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Name | Field name (/T). |
Parent | Accepted but silently dropped — see the chapter-wide note. |
Multiline | Non-zero for a multiline text field. |
MaxLen | Maximum character length (0 = unlimited). |
PosX, PosY, Width, Height | Placement box. |
Return value. The new field's handle; 0 if IPDF is invalid.
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern int pdfCreateTextField(IntPtr IPDF, [MarshalAs(UnmanagedType.LPStr)] string Name, int Parent, int Multiline, int MaxLen, double PosX, double PosY, double Width, double Height);
Area
Forms
Category
Object Creation
Exported names
pdfCreateTextField
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.