Extract payment references from invoice PDFs
21 February 2026
Capture the printed label and its value together. An invoice number, a remittance reference and a bank reference can share the same digits while identifying different things. The longest number in the payment block is not automatically the value the receiving team needs.
Build a labelled extraction record
Suppose a fictional invoice uses the following test strings. Keep them as text to preserve significant leading zeros, separators and suffixes.
| Field in the receiving record | Printed label and location | Literal value in this example |
|---|---|---|
| Invoice number | “Invoice no.” at the top of page 1 | INV-00471 |
| Remittance reference | “Quote with remittance” beneath the amount due | 00471-R |
| Bank reference | “Bank reference” in a separate reference block | BR-00471 |
Record the source revision, page, label and location with each extracted value. If a numeric string appears in the extracted text but has lost its label, return to the rendered page. Inspect the association wherever the sequence repeats. The invoice may intentionally use the same reference in two fields.
Verify the intended output
Give a reviewer the extracted remittance reference without its label and ask them to trace it back to the source. Check the leading zeros, suffix and exact line it came from. Repeat the test after export because a spreadsheet or connector may silently turn a numeric-looking string into a number.
If a field is missing or its label could apply to two values, leave it unresolved and identify the affected region. Do not borrow digits from the adjacent field or construct a bank account identifier. The invoice test results explicitly exclude payment approval, posting and supplier authentication. Deliver the verified reference and source evidence to the authorised workflow. Payment requires its own decision.
Part of the Five checks for data extracted from a PDF invoice guide.
Extract an attachment pack from a larger PDF
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 an assembly manifest with input/output page mapping.
If you take a pack out of a larger PDF, write the map before you rely on the extract.
| Output page | Source file | Source page | Included because |
|---|---|---|---|
| 1 | Name | Number | The reason |
| Next | Name | Number | The reason |
Labelled synthetic case. Extract two pages from a sample you control and check that the output page count equals the rows. A page that is not in the table should not be in the file.
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.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
