# `dump_data_fields` Print PDF form field data with XML-style escaping ## Usage > pdftl `` `dump_data_fields` `[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: ` The unique identifying name of the field (e.g., `form1.name`). * `FieldNameAlt: ` The alternate name (tooltip) of the field, if present. * `FieldType: ` The readable type of the field. * `FieldValue: ` The current value of the field. * `FieldValueDefault: ` The default value of the field, if defined. * `FieldFlags: ` An integer representing a bitmask of field properties. * `FieldJustification: ` Text alignment for text fields. * `FieldStateOption: ` Available options for Choice (dropdown/list) fields or Button (checkbox/radio) fields. Multiple lines may appear. * `FieldStateOptionDisplay: ` 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](https://pdftl.readthedocs.io/en/stable/operations/dump_data_fields.html)* *Type: Operation*