ftos.files.pdf.form.getFields

Reads all form fields from a fillable PDF and returns them as a key, where value is the actual value set on the field.

The method throws exceptions that you can catch with try catch. In this case, your script keeps running, the error doesn’t block or kill execution.

This is a business logic method for business service components.

Syntax

Copy
ftos.files.pdf.form.getFields(sourceRealName: string): any
 
Parameter Type Description
sourceRealName string It’s the input the method expects, the name or path of the PDF file whose form fields you want to extract.

Return Value

Returns an array of PDF form field objects, where each element is an representing one field (like a text box, checkbox, or dropdown) in the specified PDF form:

Copy
 {
    "Name": "City",
    "Value": "Rome",
    "SampleValue": "Rome",
    "IsRequired": false,
    "IsReadOnly": false,
    "Type": "ComboBoxField",
    "Description": "Optional - Combo box: New York | London | Berlin | Paris | Rome",
    "Options": [
      "New York",
      "London",
      "Berlin",
      "Paris",
      "Rome"
    ]
    "MaxLength":null
  }