Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

Get and Set PDF Form Fields

Prev Next

Step Details

Introduced in Version---
Last Modified in Version7.12.0
LocationData > PDF

PDF Files can have Form Fields populated or retrieved in a Flow using the Set and Get PDF Form Fields steps. Set PDF Form Fields steps can populate a PDF file with data, while the Get PDF Form Field steps read an input PDF file and can return the input or the names of the Form fields.

Set and Get PDF Form Fields is meant for PDF files with no more than 15 fields. After that point the Step will show performance degradation. For PDF files with a large number of fields, it is recommended to use the Set PDF Form Fields Dynamic step.



Properties

Configuration

PropertyDescriptionData Type
PDF File ExampleAdd a Template of the PDF file to identify the Form Fields.FileData
PDF Fields DefinitionsField names are identified after uploading the PDF File Example.---

Inputs

PropertyDescriptionData Type
PDF FileFile to get or set PDF fields for.FileData
Sorting Method *Only for Get PDF Form Field Names stepSort how the Form Fields are displayed. Sort by None, Alphabetical, Tab Order, or Position on Page.
---

Outputs *Only on the Set PDF Form Fields step

PropertyDescriptionData Type
PDF FileFile using the newly set PDF fields.FileData


Set PDF Form Fields

The following example will populate the highlighted fields within the below sample PDF.  Below is an example project that can be imported which contains the PDF used in the steps.


  1. To begin, create a new Flow.
  2. Within the Flow Designer, from the Toolbox > DATA > PDF, drag a Set PDF Form Fields step into the workspace.
  3. Connect the Start step to the Set PDF Form Fields step.
  4. With the Set PDF Form Fields step selected, click CHOOSE FILE to upload a PDF file into the Properties > CONFIGURATION > PDF File Example box. A separate step must be created for each field.
    Using the Set PDF Form Fields Dynamic step, Build Array must be selected for the Field Data and then Build Data for each item they add. The item name will be a Constant value, and the output value should use Select From Flow.

  5. After adding the PDF, notice under Properties > PDF Fields Definitions that the field names are identified. 
  6. Next, configure the Properties > INPUTS for the Set PDF Form Fields step. Form Fields must have a compatible input.
  7. Connect the Set PDF Form Fields step to the End step and Save. 

Debug

  1. Select Debug from the Top Action Bar. Click START DEBUGGING.
  2. Notice the Flow runs successfully. 
  3. Right-click on the Set PDF Form Fields step and select View Input/Output Data, and observe the INPUTS mapped earlier.


Get PDF Form Fields

This example will use the Get PDF Form Fields Names step to retrieve the list of field names from a PDF File.

  1. Create a new Flow
  2. Within the Flow Designer, from the Toolbox > DATA > PDF, drag a Get PDF Form Fields Names step into the workspace.
  3. Input a PDF file and set the Sorting Method for the step.

    For the Sorting Method, below is a table that defines the sorting setting.
    SettingDescription
    NoneThe default sort. Sorts the fields name based on what order the PDF authoring software has set.
    AlphabeticalSorts the field names in Alphabetical order.
    Tab OrderSorts the field names based on the Tab order the author assigned to each field.
    Position on PageSorts the field names based on their x and y coordinates on a page. Pages are sorted in order, From top to bottom, left to right.

Debug

  1. Select Debug from the Top Action Bar. Click START DEBUGGING.
  2. Right-click on the Get PDF Form Fields Names step and select View Input/Output Data to view the retrieved field names.

Related Information

Forum Posts:
Set PDF Form Fields