PDF-lib icon

PDF-lib

Work with PDFs using pdf-lib

Extract Form Fields

AI-generated

Summary

Extract form field metadata and values from a PDF document.

Inputs

  • PDF Source (required) — Choose the PDF source: 'From URL' to specify a PDF URL, or 'From Binary Data' to reference binary data from previous nodes.
  • PDF URL (required) — Provide the URL of the PDF file to extract form fields from (required if PDF Source is 'From URL').
  • Binary Property (required) — Specify the name of the binary property containing the PDF data (required if PDF Source is 'From Binary Data').

Output shape

a JSON object containing total field count, detailed information about each form field in the PDF (name, type, value, options, read-only status, etc.), and PDF metadata (page count, title, author, subject).

The output is available as JSON data on the node's output. The operation handles PDFs supplied either by URL or binary property. If an error occurs reading fields, those fields will include an 'error' message field.

Examples

Example 1: Extract form fields from a PDF at a given URL.

Set 'PDF Source' to 'From URL' and specify the PDF URL in 'PDF URL'. The node outputs a JSON object listing all form fields with their types and properties.

Example 2: Extract form fields from a binary PDF data from a previous node.

Set 'PDF Source' to 'From Binary Data' and specify the binary property name containing the PDF data. The node extracts and outputs form field details similarly.

Discussion