Represents a PDF form.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access the form of the PDF document
let form: PdfForm = document.form;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
number
Gets the fields count (Read only).
boolean
Gets a value indicating whether allow to export empty fields or not.
boolean
Gets a value indicating whether need appearances (Read only).
Add a new PdfField
.
Parameter | Type | Description |
---|---|---|
field | PdfField |
Field object to add. |
Returns number
Gets the PdfField
at the specified index.
Parameter | Type | Description |
---|---|---|
index | number |
Field index. |
Returns PdfField
Order the form fields.
Returns void
Order the form fields based on page tab order.
Parameter | Type | Description |
---|---|---|
tabOrder | PdfFormFieldsTabOrder |
tab order types for form fields. |
Returns void
Order the form fields based on tab collection.
Parameter | Type | Description |
---|---|---|
tabCollection | Map |
collection of tab order with page index. |
Returns void
Remove the specified PDF form field.
Parameter | Type | Description |
---|---|---|
field | PdfField |
Field object to remove. |
Returns void
Remove the PDF form field from specified index.
Parameter | Type | Description |
---|---|---|
index | number |
Field index to remove. |
Returns void
Sets the flag to indicate the new appearance creation If true, appearance will not be created. Default appearance has been considered. If false, new appearance stream has been created from field values and updated as normal appearance.
Parameter | Type | Description |
---|---|---|
value | boolean |
Set default appearance. |
Returns void