Skip to content
Book a consultation

· Commentary · Forgante

Automatic KSeF number recognition from scans and PDFs: why bother, if the invoice is already in KSeF

SaldeoSMART reads the KSeF number straight off a scanned or PDF invoice and saves it in the "Numer w KSeF" (KSeF number) field in the document header. The feature applies to invoices that do not arrive in the system directly from KSeF, Poland's National e-Invoicing System, but come from a contact as a scan or a PDF instead. The number can also be typed in by hand; either way, the software checks it and makes sure the same number cannot end up in the database twice.

SaldeoSMART material: the KSeF number field in the invoice header, filled in after reading it off a scan. SaldeoSMART material

How KSeF number recognition works

The KSeF number field sits in the header section, next to the invoice number and the dates. The software recognises the number on a scan or in a PDF and fills it in on its own. When recognition fails, or the number needs a correction, it can be typed in by hand. The field stays optional, but once it is filled in, SaldeoSMART checks its format: the issuer's NIP at the start, the date encoded in the number and the check digits. An invalid number simply will not save; the software flags the error instead.

There is a second mechanism at work here, and it matters more than the character recognition itself. A KSeF number is unique, so the same number cannot appear twice in a company's document database. Trying to enter a number that already exists triggers a duplicate warning with a link to the existing document. Once a valid, unique number is saved, the issue date field fills in on its own and becomes read only. Approving or rejecting an invoice in the mini workflow only becomes possible once the document carries a valid KSeF number. The number can also be corrected from a phone, on documents the mobile app's OCR has already recognised.

Why bother, if the invoice is already in KSeF

We hear this question often, mostly from companies that already pull invoices from KSeF automatically. The answer is simple: not every invoice reaches the accounting team by the same route. Some suppliers, KSeF obligation or not, still email a PDF or hand over paper, because habits outlast regulations. On top of that, some documents genuinely sit outside the system: manually entered corrections, or invoices from suppliers who have only just become subject to the obligation.

The trouble starts when the same invoice arrives twice: once automatically through KSeF, and once as a scan from a client who has no idea the document is already in the system. Without reading the number, the accountant sees two separate files. Confirming they are the same document means comparing amounts and dates by hand, and once the monthly invoice count climbs, that check simply stops happening in time. The duplicate check solves this automatically: if the KSeF number repeats, the software flags the existing document before anyone gets the chance to book it twice.

How we set this up for clients

During implementation we make one thing clear to the accounting team: the KSeF number field is not decoration, it is protection against double booking. We ask that every scan or PDF a client emails into SaldeoSMART go through that field before it reaches approval, rather than skip straight to it. When the software flags a duplicate, whoever is entering the document has a clear rule: do not book it a second time, check instead whether the original from KSeF has already gone through the workflow.

Accounting firms serving several clients see the payoff fastest, because the scale of the risk grows with the number of invoices. One thing we advise against: switching off number validation "to save time" on documents from outside KSeF. It saves a few seconds per invoice and costs far more time correcting a duplicate entry in the VAT register.

Source: SaldeoSMART blog post "Automatyczne odczytywanie numeru KSeF z faktur PDF i skanów" (June 2026, in Polish). Commentary and implementation examples: Forgante.

Let's set up KSeF number recognition for you

We can check whether invoices from scans and from KSeF might duplicate in your workflow, and set up number recognition so nothing gets booked twice.

Your message is answered by someone who runs implementations. Prefer to call? 513 805 506