Skip to main content

Export To JSON

Exports PDF form fields and their current values to a JSON file for data extraction or backup purposes.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • PDF Path - Path to the PDF file containing form fields to export.
  • JSON Path to Save - Output path where the exported JSON file will be saved.

Options

This node does not have any configurable options.

Output

This node does not produce any output variables. The result is saved to the specified JSON file.

How It Works

The Export To JSON node extracts all form field data from a PDF file and saves it in JSON format. When executed, the node:

  1. Validates the input PDF file path
  2. Opens the PDF file and reads all form fields
  3. Extracts field names and their current values
  4. Converts the form data to JSON format
  5. Saves the JSON data to the specified output path

Use Cases

  • Data Extraction: Extract filled form data from PDF documents for processing
  • Backup: Create a backup of form field values before modifying a PDF
  • Data Migration: Export form data to transfer between different PDF files
  • Reporting: Extract form data for analysis or reporting purposes
  • Template Creation: Export form structure to understand field names and types

Example Workflow

  1. Receive a completed PDF form via email
  2. Use Export To JSON to extract the form data
  3. Process the JSON data with other nodes
  4. Store the data in a database or send it to an API

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid PDF path
  • PDF file not found at the specified path
  • Empty or invalid JSON path
  • PDF file is encrypted or password-protected
  • PDF file does not contain form fields
  • Insufficient permissions to read the PDF file or write the JSON file

Usage Notes

  • The exported JSON contains field names as keys and field values as values
  • All form field types are supported (text, checkbox, radio, dropdown, etc.)
  • Empty fields are included in the export with empty or null values
  • The JSON structure mirrors the PDF form field hierarchy
  • File paths can be absolute or relative
  • The output directory must exist before saving the JSON file
  • The node preserves field types and values exactly as they appear in the PDF
  • For encrypted PDFs, decrypt the file first using the Decrypt node