pdfcpu

Logo

A PDF processor written in Go.

View the Project on GitHub pdfcpu/pdfcpu


Changelog

List form fields

This command prints a list of all form fields for a PDF form.

Have a look at some examples.

Usage

pdfcpu form list inFile...


Common Flags

name description values
v(erbose) turn on logging  
vv verbose logging  
q(uiet) quiet mode  
u(nit) display unit po(ints),in(ches),cm,mm
c(onf) config dir $path, disable
upw user password  
opw owner password  


Arguments

name description required
inFile PDF input file containing a form yes


Examples

List all form fields of english.pdf:

$ pdfcpu form list english.pdf

english.pdf
Pg L Field     │ Id | Name       │ Default          │ Value                    │ Options
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1   Textfield │ 30 | firstName1 │ Joe              │ Jackie                   │
     Textfield │ 31 | lastName1  │ Doeby            │ Doe                      │
     Datefield │ 34 | dob1       │ 01.01.2000       │ 31.12.1999               │
     RadioBGr. │ 36 | gender1    │ male             │ non-binary               │ female,male,non-binary
     ListBox   │ 17 | city11     │ Vienna,São Paulo │ San Francisco,Vienna     │ San Francisco,São Paulo,Vienna
     ComboBox  │ 38 | city12     │ San Francisco    │ Sidney                   │ London,San Francisco,Sidney
     CheckBox  │ 40 | cb11       │                  │ Yes                      │
     Textfield │ 41 | note1      │                  │ This is a sample text.\n │


List all form fields of person.pdf.

The * indicates locked fields aka write-protected or read-only:

$ pdfcpu form list person.pdf

person.pdf
Pg L Field     │ Id | Name        │ Value   │ Options
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1   Textfield │ 30 | firstName   │         │
     Textfield │ 31 | lastName    │         │
     Datefield │ 34 | dob         │         │
     CheckBox  │ 36 | dobVerified │         │
     RadioBGr. │ 17 | gender      │         │ female,male,non-binary
     Textfield │ 38 | country     │         │
   * Textfield │ 40 | planet      │ Earth   │
     Textfield │ 41 | occup       │         │
     ComboBox  │ 42 | status      │ unknown │ alive,deceased,imprisoned,killed,unknown
     ComboBox  │ 43 | license     │         │ CC BY 4.0,CC BY-SA 2.0,Public Domain,unknown