pdf » saveFormValues(pdf,var,pageAndLineStartEnd,strategy)
Description
This command saves the form values from the pdf document and store the data in the given variable name.
This assumes that the underlying pdf has a form, which is to be parsed via
saveFormValues(pdf,var,pageAndLineStartEnd,strategy)
.
Consult the PDF Form Data Extraction for more details.
This is the general approach:
- Make sure the target PDF exists via io »
assertReadableFile(file,minByte)
- not entirely necessary, but would be easier for root cause analysis.
- Make sure the target PDF contains key phrases, so as to affirm its validity.
- again, not necessary but simplifies root cause analysis.
- Parse and save the PDF form via
saveFormValues(pdf,var,pageAndLineStartEnd,strategy)
- Perform form-level validation via one or more of the following commands:
Parameters
- pdf - the PDF file to validate
- var - variable name to store the form data
- pageAndLineStartEnd - identify the starting page number, start line and end line. All the three values to be given with comma separated
- strategy - the strategy to read the pdf form. See Form Data Extraction for more details.
Example
Script:
Output: