Introduction to Forms
Form support of PSPDFKit
PSPDFKit supports all form types specified by the PDF specification. We have to differentiate between the field objects and the annotation objects.
|Type||Field Object||Annotation Object|
|Check, Radio and Pushbuttons||
|List and Comboboxes||
|Digital Signatures||Coming in a future release||
Retrieving Field and Annotation objects
The field objects handle the state of the form field and offer appropriate methods to modify the form field. Each form field has a
fullyQualifiedName that can be used to identify and retrieve a specific field object.
Each field object has one or more annotations linked to it. The main purpose of the annotation object is to offer a graphical element on top of the PDF (see Introduction to Annotations).
Renaming form field names
Form field names can't be renamed using a
PSPDFFormElement instance, due to internal constraints. It is, however, possible to rename them using the
formFieldNameMappings. You can simply pass in a dictionary containing your source form field name and the new form field name.
As an example, this can be useful if you have a template PDF with form fields that needs to be appended to a different PDF file. Form field names must be unique and it would not be possible to append the same template multiple times without changing the names.
Please note, this requires the Document Editor component to be enabled for your license.