dump_data_fields
Print PDF form field data with XML-style escaping
Usage
pdftl
<input>dump_data_fields[output<output>]
Details
Extracts data from all interactive form fields (AcroForm fields) within the input PDF.
The output uses a stanza-based format compatible with
pdftk. All string values (such as the field’s content)
are processed with XML-style escaping.
This output is for informational purposes or for use in
external scripts. It is not designed to be read by the
update_info operation. To fill form fields, use the
fill_form operation.
Field Stanza Format
Each field is represented by a single stanza. Each stanza
consists of a separator line ---, followed by:
FieldName: <full_field_name>The unique identifying name of the field (e.g.,
form1.name).FieldNameAlt: <tooltip_text>The alternate name (tooltip) of the field, if present.
FieldType: <Text|Button|Choice|Signature|...>The readable type of the field.
FieldValue: <current_value>The current value of the field.
FieldValueDefault: <default_value>The default value of the field, if defined.
FieldFlags: <integer>An integer representing a bitmask of field properties.
FieldJustification: <Left|Center|Right>Text alignment for text fields.
FieldStateOption: <option_value>Available options for Choice (dropdown/list) fields or Button (checkbox/radio) fields. Multiple lines may appear.
FieldStateOptionDisplay: <display_text>The display text corresponding to the preceding
FieldStateOption, used when the export value differs from the display value.
Examples
Print XML-escaped form field data for in.pdf
pdftl in.pdf dump_data
Save XML-escaped form field data for in.pdf to data.txt
pdftl Form.pdf dump_data_fields output data.txt
Tags: info, forms
Source: pdftl.operations.dump_data_fields
Read online: https://pdftl.readthedocs.io/en/stable/operations/dump_data_fields.html
Type: Operation