Extract fields by area
Read the text of several named areas of a PDF at once, e.g. invoice number, date and total, into a Dictionary.
Command in the PDF toolkit · id ooa.pdf/extract_fields · 5 inputs (2 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Path | File | Yes | PDF file. | |
| Fields | Dictionary | Yes | Area name to {page, x, y, width, height}: points (72 per inch) from the top-left corner of the page; page 1 when left out. | |
| Trim | Boolean | No | true | Remove spaces and line breaks around each value. |
| All pages | Boolean | No | false | Read each area on every page and give a List of values per name (for a form repeated page after page). |
| Password | Credential | No | Password for protected PDFs. |
Outputs
| Output | Type | What it is |
|---|---|---|
| values | Dictionary | Each area's name and the text found in it (empty when nothing is there). |
| empty | List | Names of the areas where no text was found. |