NewFormField

Form fields

Description

Adds a new form field to the selected page.

For Text, Pushbutton, Checkbox, Choice, and Signature fields, the field is also attached to the current page as a Widget annotation and receives an annotation /P page reference. Because annotation /P is a PDF 1.3 entry, creating those fields in a PDF 1.2 document auto-selects PDF 1.3. Signature fields may still require PDF 1.5 when the generated AcroForm signature flags require it.

Syntax

Delphi

function TPDFlib.NewFormField(Const Title: WideString; FieldType: Integer): Integer;

ActiveX

Function PDFlib::NewFormField(Title As String, FieldType As Long) As Long

DLL

int DLNewFormField(int InstanceID, wchar_t * Title, int FieldType);

Parameters

TitleThe title of the new form field. The title cannot contain the period "." character.
FieldTypeThe type of the field to create: 1 = Text 2 = Pushbutton 3 = Checkbox 4 = Radiobutton 5 = Choice 6 = Signature 7 = Parent

Return values

0The new form field could not be created
Non-zeroThe form field was created successfully, and this is the index of the new field