OpenForm
CLICommands

inspect

Last updated on

Inspect PDF form fields

Inspects PDF form fields to aid in bindings configuration.

Usage

ofm inspect <pdf> [options]

Arguments

ArgumentDescription
pdfPDF template file (path or - for stdin)

Options

OptionDescription
--format <format>Output format: table or json (default: table)
--filter <pattern>Filter field names by glob pattern (e.g., party_*)
--summaryShow totals only (no field listing)
--include-buttonsInclude button fields in the output
--include-signaturesInclude signature fields in the output
--out <file>Write inspection result to JSON file

Description

The inspect command extracts and displays all AcroForm fields from a PDF file. This helps you understand the PDF's field structure when configuring form bindings.

Examples

Inspect a PDF:

ofm inspect form-template.pdf

Filter fields by pattern:

ofm inspect form-template.pdf --filter "address_*"

Output as JSON:

ofm inspect form-template.pdf --format json

Get summary only:

ofm inspect form-template.pdf --summary

Save to file:

ofm inspect form-template.pdf --out fields.json

Output

Table format:

Fields from form-template.pdf:
┌──────────────────┬──────────┬──────────┬─────────┐
│ Name             │ Type     │ Required │ Value   │
├──────────────────┼──────────┼──────────┼─────────┤
│ full_name        │ text     │ yes      │         │
│ address_line1    │ text     │ yes      │         │
│ address_city     │ text     │ yes      │         │
│ agree_terms      │ checkbox │ no       │ false   │
└──────────────────┴──────────┴──────────┴─────────┘

Summary format:

{
  "source": "form-template.pdf",
  "total": 15,
  "breakdown": {
    "text": 10,
    "checkbox": 3,
    "dropdown": 2
  }
}

See also

  • render - Render artifact layers
  • attach - Attach PDF files to artifacts

On this page