Five checks for data extracted from a PDF invoice

6 September 2026

An open notebook with a pen, coloured page tabs and a calculator on a white desk.
Illustrative photograph. Cropped and resized. Photo: “Finance Flatlay Background” — Artsy Crafty / NegativeSpace. · CC0 1.0

A readable amount can still be linked to the wrong supplier or posted twice. This worked example extracts three fictional billing documents, reconciles the header fields and line cells, then introduces five mistakes on purpose. Use the saved records to see which check catches each one before proposing an import into a business system.

Related articles

What should an invoice import verify?

Specify the record your destination system needs: document type and identifier, supplier reference, dates, currency, line items, tax amounts, totals and relevant payment information. Decide which fields are mandatory for the intended stage. A record ready for a review queue is not necessarily ready for posting or payment.

Readable or searchable text provides evidence from the page. Structured extraction assigns that text to fields. Validation checks whether those fields agree with the source and with the permitted business rules. Approval remains the responsibility of the authorised business process.

Where this guidance stops

This guide covers invoice-specific extraction controls. It does not establish statutory tax treatment, authorise payments or claim that ArkePDF provides an invoice-processing feature. The examples use fictional suppliers and invented amounts; they illustrate field handling and arithmetic only.

Sample supplier and layout variation

Credit notes, currencies and multi-page layouts

Select permitted documents across the supplier families and formats that will reach the workflow. Include invoices and credit notes, multiple currencies, multi-page line tables, discounts, charges, rounding and poor scans where relevant. Reserve some layouts for testing so a successful parser is not judged only on documents used to build its rules.

Create independent expected values with source references. Record the document page and region for each material field. Retain both the displayed text and the normalised value, including the rule that interprets a date, decimal separator or sign.

VariationValidation question
Credit noteIs document type preserved and business direction explicit?
Multiple currenciesDo fields and totals use the intended currency?
Repeated page headingsAre header rows excluded from line items?
Missing supplier referenceCan an authorised process resolve identity without guessing?
Discounts and chargesDoes the reconciliation include the adjustments actually present?

Microsoft's invoice-model documentation describes extraction of invoice fields and line items into structured output. Such capabilities define candidate outputs to evaluate; they do not make the resulting record approved for your organisation's use.

Three synthetic documents and five injected faults

Inputs, assumptions and the expected result

The original synthetic invoice corpus contains two invoices and one credit note. All payment instructions are deliberately non-functional. Tax amounts are invented test data, not a country's tax rate or requirement.

DocumentCurrencyNet amountTaxTotal and direction
SYN-INV-001USD125.0012.50137.50 invoice
SYN-INV-002EUR140.000.00140.00 invoice
SYN-CN-003USD20.000.0020.00 credit note

The first invoice contains line amounts of 100.00 and 25.00. Their sum is 125.00; adding the displayed 12.50 tax gives 137.50. The credit note displays positive source amounts. A separate, explicitly defined transformation assigns its credit direction; the source text is preserved.

The fixture was created with ReportLab 4.4.9. A local Python 3.12.14 script using pdfplumber 0.11.9 reads the known field labels and table layout. The saved run matched all 21 expected header fields and 20 line-item cells across the three documents. This is a tailored, rule-based parser for these authored PDFs, not a general invoice model or an OCR test.

The extracted records then pass the example's arithmetic and test-master checks. Their illustrative directional totals are USD 117.50 and EUR 140.00. The script keeps currencies separate and performs no currency conversion, ledger posting or payment action.

For a production transformation, preserve identifiers as identifiers: removing leading zeroes can change an invoice reference even when a spreadsheet regards it as a number. Keep the original date string beside the interpreted date and its format rule. Record source page references so a reviewer can locate an uncertain value without searching the entire batch. Apply numeric conversion only to fields whose meaning and permitted notation are established.

What the results establish

The corpus demonstrates a reproducible extraction-and-validation boundary. It does not prove performance on supplier invoices, validate actual tax treatment or authenticate a supplier. The authored ground truth requires independent human review for a real pilot, and no human review-time measurement is claimed here.

Validate fields and financial consistency

Arithmetic, duplicates and missing mandatory fields

Use several checks because each catches a different failure. Compare critical fields to their source regions. Check required values before transforming the record. Reconcile line amounts, document-level adjustments, tax and totals using the applicable rules and declared precision.

For a concrete structured-invoice example, Peppol BIS Billing rule BR-CO-15 expresses the relationship between the total including VAT, total excluding VAT and VAT amount. That profile-specific rule illustrates explicit arithmetic validation; it does not determine which tax treatment applies to an arbitrary PDF.

The local validator also runs five deliberately injected cases: an incorrect total, a missing document identifier, an unknown supplier, a currency outside the test scope and a duplicate business key. It detects the intended condition in all five cases. These are constructed validation faults, not observed errors from an extraction service.

Choose duplicate keys with the business owner. The example uses supplier, document type, document identifier and currency. Real data may require additional handling for corrected invoices, reused identifiers or incomplete records. Similar amounts alone are insufficient to decide that two documents are duplicates.

Keep false acceptance and false rejection visible. A missed duplicate could create repeated work or posting risk; a legitimate credit note incorrectly rejected as an invoice delays resolution. Record the relevant denominator for each check rather than compressing every field and document into one accuracy percentage.

Sample the accepted stream as well as the exception queue. For example, report accepted records with a critical error divided by accepted records independently reviewed, with the sampling method and supplier mix attached. Reviewing only rejected records cannot establish how many errors escaped the checks. Report results by material supplier or layout group so a strong result on a common easy form does not conceal failures elsewhere.

Acceptance checklist for PDF invoice extraction validation

Confidence, supplier mismatch and approval ownership

Use confidence information to route review, alongside validation results and business impact. Microsoft's confidence guidance distinguishes estimated field confidence and human review; not every field returns a score. Calibrate any threshold on your own representative results instead of treating an arbitrary number as permission to post.

Refer records with missing mandatory values, supplier mismatches, inconsistent totals or ambiguous document type to the appropriate reviewer. Show the source, extracted value and failed rule together. Do not silently replace payment information from an uncertain extraction or treat a document's appearance as proof of supplier identity.

Before acceptance, establish that:

  • Critical fields can be traced to the correct document and page.
  • Document type and currency survive normalisation.
  • Lines, adjustments and totals reconcile under the intended rules.
  • Duplicate candidates have a controlled review path.
  • Uncertain supplier or payment details cannot bypass approval.
  • Corrections are attributed and preserve the original extraction.
  • The receiving system rejects incomplete or unauthorised records.

Request a better source when the relevant text cannot be read reliably. Keep unresolved ambiguity explicit rather than forcing every document into a complete-looking record.

Set a controlled automation threshold

Human-review effort and error consequences

Approve automation by document family, field criticality and destination action. A workflow may allow extraction into a review queue while retaining human approval for posting. Define what happens when the supplier layout, model or transformation changes, and retest the affected cases.

Include exception effort in the cost model. For a hypothetical 500-document batch, assume 100 exceptions at four minutes each, 50 separate routine checks at one minute each and 20 minutes of reprocessing. The total is 470 minutes, or seven hours and 50 minutes. These are illustrative assumptions; replace them with observed timings before claiming savings.

The finance process owner accepts the business rules, the data team owns transformations and evidence, and the receiving-system owner controls import behaviour. Use a representative pilot to choose a bounded automation threshold, retaining a clear route for records whose meaning or approval remains uncertain.

How to validate invoice totals after PDF extraction

Match the invoice identifier and currency as well as the extracted total before treating a reconciled amount as the correct invoice.

Read “How to validate invoice totals after PDF extraction”.

How to distinguish a corrected invoice PDF from a duplicate

Check whether a repeated invoice identifier belongs to an amended invoice before rejecting the new arrival as a duplicate.

Read “How to distinguish a corrected invoice PDF from a duplicate”.

How to extract a credit note without reversing the sign twice

Use the credit note’s document type and printed sign together to determine the posting direction and avoid reversing a credit twice.

Read “How to extract a credit note without reversing the sign twice”.

How to trace an extracted invoice field back to the PDF

Keep the page and field location beside the extracted value so a reviewer can return directly to the supporting invoice line.

Read “How to trace an extracted invoice field back to the PDF”.

Evaluate data-location evidence from a PDF supplier

This section answers a narrower question than the rest of this page, and it does not mint a new URL. The original contribution preserved here is a shared-responsibility and architecture decision matrix.

Draw the line between what you run and what a supplier runs before you treat a diagram as an answer.

ComponentYou operate itA supplier operates itEvidence you will accept
The processing path named in this sectionYes or noYes or noA dated note of where it runs
Identity, network path, or location, as relevant to the headingYes or noYes or noThe supplier’s statement plus your own check
Who restores or supports itNamed roleNamed contractNot completed here

Labelled synthetic case. Sketch one path for a sample document and mark each hop as yours or the supplier’s. A blank hop is an open question, not a “no”.

The rest of this page remains the parent decision. Use the table for the question in the heading, and leave a cell blank rather than filling it from memory.

Sources

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with ChatGPT. Editorial and technical checks by Kairos (Codex). The linked articles were drafted with NotebookLM and independently checked and edited by Kairos (Codex).