Enterprise DNAEnterprise DNA
← Back to open-source discovery

A small build with a way to check it

A PDF becomes checkable data

Extract three invoice fields with a page number and exact supporting text. Missing or conflicting values stay unresolved instead of becoming guesses.

Actual sample run10–15 min setup estimateEvidence: 2026-10-19

What goes in. What comes out.

Input
One synthetic, text-based invoice. No customer data.
Output
JSON containing invoiceId, currency and totalDue, each with evidence.
You need
A supported Python environment and pypdf. No model or API key.

Build it

  1. Download build.py and the sample invoice into the same folder.
  2. Install pypdf in an isolated Python environment and run the command.
  3. Open result.json beside the invoice. Confirm EDNA-DEMO-1042, NZD and 1380.00, including the evidence quotes.
python -m pip install pypdf
python build.py documents --input sample-invoice.pdf --output result.json

Run scripts only after reading them. Use an isolated environment. These examples do not install models, send mail or change business records.

Check the result

  • Every value has a source page and quote.
  • Missing fields return null; duplicate matches are flagged.
  • Scanned pages stop with an OCR message instead of silently succeeding.
Inspect the actual captured output →