Draw boxes once · pull the same fields from hundreds of PDFs · CSV or XLSX

PDF Zonal Data Extractor

Load a sample PDF, draw named rectangles around the values you need, set how each is cleaned and typed, then run the template over up to 500 PDFs. Zones can follow an anchor text such as Invoice No. when a layout shifts.

1. Sample PDF

Drop the sample PDF

One representative file, up to 50 MB. Password-protected files need Unlock PDF first.

Whole-table conversion is PDF to Excel; renaming files by a value found in them is Rename PDFs by content.

PDF Zonal Data Extractor

Operator: Abdulla Al Fahad. How tools are built and checked

Supplier invoices, delivery notes and statements put the same few values in the same places on every page: an invoice number top right, a total bottom right. Copying them by hand is slow and error-prone, and turning the whole page into a table drags in everything you did not want.

This page lets you mark those places once on a sample PDF, give each a column name and a type, and then reads exactly those boxes from up to 500 PDFs into one sheet.

Key features

  • Named rectangles on any page, drawn with the pointer on a zoomable page or placed by typing left, top, width and height in points
  • Keyboard control: with a zone focused, arrow keys move it by 1 point (10 with Shift) and Alt plus arrows resizes it
  • Per-zone cleaning: trim, a regular expression whose first group is kept, join lines with a space, a line break or nothing, and a type of text, number or date
  • Anchors that tie a zone to a label such as 'Invoice No.' so a shifted layout still lands on the right value
  • Templates saved and loaded as JSON, one row per PDF or one row per page, and CSV or XLSX output
  • Optional OCR for zones on scanned pages, either always for a zone or only on pages with no text layer

How zones, anchors and field types are read

A zone is stored as fractions of the page width and height, so one template works on pages of the same layout at a different size. The text inside is the PDF text items whose centres fall inside the rectangle, ordered into lines, so a word that only overlaps the edge is left out unless its centre is inside.

A number zone reads '1,234.50', '1.234,50', '1 234,50' and '1'234.50' either by detection or by the format you choose, and writes a plain number. A date zone writes ISO year-month-day; a slash date such as 14/03/2026 is read as day first or month first according to the setting on that zone. Text that does not parse stays in the sheet's warning column rather than being guessed.

An anchor is a piece of text, matched as 'contains' or as a regular expression, searched on the same page as the zone. The zone keeps its offset from the first matching line, so when the whole block moves down 40 points on one invoice the box moves with it. If the anchor text is missing from a page the zone is outlined in dashed red and that row gets a warning.

OCR runs on the zone's own crop, rendered at 200 dpi, using the shared engine that downloads English language data of about 15 MB the first time it is needed.

How it works

Each PDF in the batch is opened with pdf.js, its text items are read per page, and every zone is evaluated against them: find the anchor if there is one, collect the items in the box, join, trim, apply the regular expression, then convert by type.

Rows are written in the order the files were chosen, with a file name column first, a page column in per-page mode and a warnings column last.

A value lifted from a PDF that a spreadsheet would read as a formula, such as text starting with =, is written as plain text, so a hostile document cannot plant a formula in your sheet.

Common use cases

  • A bookkeeper receives 200 PDFs a month from one supplier and extracts invoice number, date, net and total into a 200-row XLSX to paste into the ledger.
  • A logistics clerk reads the consignment number and weight from page 1 and the signature date from page 3 of 60 delivery notes, using one template with zones on two pages.
  • A charity sets one zone per page in per-page mode to pull the donation amount from each page of a 40-page receipt book.

How to use this tool

  1. Drop one representative PDF; password-protected files need Unlock PDF first.
  2. Drag a rectangle around the first value and give it a column name in Zone settings; repeat for each value, using Next page for other pages.
  3. Set each zone's type, regex and anchor, then press Test all zones on this PDF and read the result under each zone name.
  4. Save the template, choose One row per PDF or per page, and drop the PDFs to process.
  5. Download the CSV or XLSX from the Results panel.

Example

Three illustrative one-page invoices from the same supplier, with a template of three zones

Zone 1, Invoice number: number-field regex INV-(\d+), anchored to the text 'Invoice No.'. Zone 2, Invoice date: type date, day first, anchored to 'Date:'. Zone 3, Total: type number, no anchor. Files: inv1.pdf, inv2.pdf, inv3.pdf, where inv2.pdf has its header block 40 points lower than the others.

Results table

inv1.pdf: 1001, 2026-03-14, 1234.5. inv2.pdf: 1002, 2026-03-15, 3075. inv3.pdf: 1003, 2026-03-16, 1229.99. The Warnings column is empty for all three; without the anchors the inv2.pdf header values would be read from the wrong place.

Tips for best results

  • Anchor every zone that sits next to a label, and leave the fixed ones such as a footer unanchored; mixing both keeps the template tolerant without drift.
  • Use the regex to keep only the part you want, for example 'Invoice No: INV-1001' with ([A-Z]+-\d+) gives INV-1001.
  • Draw a zone slightly larger than the text; a box that clips a character gives a number that is off by a digit.

Common pitfalls

A template assumes pages of one layout. A supplier who changes the invoice design needs a new template; the warnings column shows where values stopped matching.

Scanned PDFs have no text layer, so the zones return nothing until OCR is switched on for the zone or for the template, and OCR accuracy depends on the scan.

The preview table shows the first 200 rows only; the CSV and XLSX contain every row.

Common errors and how to fix them

"The regex did not match"
The pattern found nothing in the zone's text. Press Test all zones to see the text the zone returns, then adjust the pattern or the box. Group 1 is what is kept, so wrap the part you want in brackets.
"Two zones share a name. Rename them so each column has its own heading."
Column names must be unique, ignoring case. Rename one of the zones in Zone settings and run again.
"'Invoice No.' was not found on page 1. Anchors need a text layer."
Check the spelling or switch the match to Regex. If the PDF is a scan, the page has no text to anchor to; use fixed zones with OCR instead.

Best practices

  • Run the template on a mixed handful of files first, including the oddest one you have, before processing the full 500.
  • Name zones as the final column headings you want, since they become the sheet's headings unchanged.

Limits of one run

A template holds up to 100 zones, a run takes up to 500 PDFs of up to 50 MB each, and a run can be cancelled. Files are read one at a time, so memory use does not grow with the number of PDFs.

What the output sheet looks like

Column one is the file name, then one column per zone in the order the zones were drawn, then Warnings. In per-page mode a Page column follows the file name and every zone is applied to every page, which suits a PDF of many one-page documents. In per-PDF mode each zone reads the page it was drawn on, and a PDF without that page gets a warning for that zone.

Frequently asked questions

How is this different from converting the PDF to Excel?

PDF to Excel rebuilds a whole table from a page. This tool reads only the boxes you drew, so values that are not in a table, like an invoice number in a header, come out as columns.

Can one template cover pages of different sizes?

Yes if the layout is the same, because zones are stored as fractions of the page. The point values in the fields are shown for the page currently on screen.

What happens if a PDF is missing a page the template uses?

The row gets a warning that the page does not exist and the zone's cell stays empty; the rest of the row is still filled.

Can I rename files by the value I extract?

Not here. Rename PDFs by content on this site does that job from a pattern; this tool is for building a sheet.