Inspect form field data⚓︎
Once a PDF form is prepared, PyPDFForm can help you inspect its fields to determine the data needed to fill it. Several inspection methods are available to choose from.
This section of the documentation uses this PDF as an example.
The CLI examples pipe JSON output through jq -S for sorted, readable output.
Generate a JSON schema that describes a PDF form⚓︎
PyPDFForm can describe the data needed to fill a PDF form as a JSON schema:
In this example, sample_template.pdf contains three text fields (test, test_2, and test_3) of type string and three checkboxes (check, check_2, and check_3) of type boolean.
You can use the PyPDFForm-generated JSON schema to validate the data used for filling a PDF form.
Inspect PDF form data⚓︎
To inspect the current values in a filled PDF form, use the .data attribute. For example, the following snippet inspects the values in this PDF:
Generate sample data⚓︎
PyPDFForm can also generate sample fill data for a PDF form: