PDF to ZUGFeRD and Factur-X: Invoice Data Extraction for EN 16931 E-Invoicing

Converting a PDF invoice into ZUGFeRD or Factur-X takes two steps: read the invoice data, then embed it as CII XML inside a PDF/A-3 container. InvoiceExtractor handles the first step at scale. Upload any vendor PDF, scan, or photo and get every header field and every line item back as structured JSON, CSV, or Excel, ready to hand to your Factur-X generator, your approved platform, or your ERP.

PDF, JPG, PNG, BMP, HEIC, TIFF

Upload your invoices

EN 16931 Field Coverage
Full Line-Item Capture
Any Vendor Layout
JSON, CSV and Excel Output

Why the European Mandates Break on Legacy PDF Invoices

France and Germany both set hard dates for structured B2B e-invoicing, and both accept the hybrid PDF formats. The gap is that almost every invoice a business already holds, and most of what still arrives from suppliers, is a plain PDF with no data inside it.

The Dates Are Fixed

In France, every VAT-registered business must be able to receive e-invoices from 1 September 2026, with large and mid-sized companies also issuing from that date and smaller companies following on 1 September 2027. In Germany, businesses above 800,000 euros of turnover must issue from 1 January 2027 and everyone else from 1 January 2028.

A PDF Is Not an E-Invoice

A PDF is a picture of an invoice. Even a born-digital one carries no reliable machine-readable fields, so it cannot satisfy EN 16931 on its own. The structured data has to exist before any generator can build a compliant file.

MINIMUM and BASIC WL Will Not Pass in Germany

The German Ministry of Finance guidance of 15 October 2024 accepts ZUGFeRD from version 2.0.1, but explicitly excludes the MINIMUM and BASIC WL profiles because they omit required fields. BASIC WL in particular carries no line items, so a profile choice made to save effort can fail the mandate.

Line Items Are the Hard Part

Header capture is easy and most tools stop there. The EN 16931 profile expects the full line-item table: description, quantity, unit, unit price, line total, and the tax rate per line. Rebuilding that table by hand for a backlog of invoices is where the real cost sits.

Where InvoiceExtractor Fits in the Factur-X Pipeline

We are deliberately clear about scope. InvoiceExtractor is the extraction layer, not a generator and not an approved platform. It turns unstructured PDFs into the clean, complete dataset that every downstream ZUGFeRD or Factur-X step depends on.

Every EN 16931 Field the PDF Contains

Seller and buyer details, VAT identifiers, invoice number, issue date, due date, currency, net and gross totals, tax breakdown by rate, and payment terms, pulled from any layout without templates.

Complete Line-Item Tables

The full table, not just the totals: description, quantity, unit of measure, unit price, line amount, and the tax rate on each row, which is exactly what the EN 16931 and EXTENDED profiles expect.

Structured JSON for Your Generator

Export clean JSON and map it straight into Mustangproject, the factur-x Python library, iText, or whatever your platform uses to write the CII XML. No screen scraping and no regex over PDF text.

An API for the Whole Backlog

Point the API at an archive of thousands of legacy PDFs and get consistent structured output for each one, so a migration project runs as a batch job rather than a data-entry program.

Scans and Photos, Not Just Clean PDFs

Supplier invoices arrive as scans, phone photos, and faxes. AI extraction reads them the same way it reads a born-digital PDF, so the awkward end of the archive is not left behind.

Review Before You Commit

Every extraction is shown as an editable table next to the source document, so a person can correct an odd VAT rate or a merged column before the data is embedded in a file you are legally responsible for.

How to Get PDF Invoice Data Ready for ZUGFeRD or Factur-X

Four steps take a folder of ordinary PDFs to the point where a generator can produce a compliant hybrid invoice.

1

Upload the Invoices

Drop a single PDF or a whole batch into the converter at the top of this page, or send them through the API. Scans, photos, and multi-invoice PDFs are all accepted.

Tip: Start with twenty invoices from your five noisiest suppliers. Those layouts tell you more about the real accuracy you will get than a hundred clean ones.

2

Check the Extracted Table

The AI returns header fields and the full line-item table beside the original document. Scan the tax breakdown and the line totals, and fix anything the source document itself rendered ambiguously.

Tip: Confirm the net, tax, and gross figures add up per rate. A tax breakdown that does not foot is the single most common reason a generated file fails validation later.

3

Export as JSON or CSV

Download structured JSON for a generator library, or CSV and Excel if the data is going into an ERP that will issue the e-invoice for you.

Tip: JSON keeps the line items nested under their invoice, which saves you rebuilding the parent-child relationship that a flat CSV loses.

4

Generate and Validate the Hybrid File

Map the fields into your ZUGFeRD or Factur-X generator, which embeds the CII XML in a PDF/A-3 container, then run the result through a validator before anything goes to a customer or an approved platform.

Tip: Target the EN 16931 profile or higher. It is the level Germany accepts and it carries the line-item detail that MINIMUM and BASIC WL leave out.

Who Needs PDF to ZUGFeRD and Factur-X Conversion

The deadline pressure lands hardest on finance teams with a large PDF archive and on the developers asked to build the pipeline.

Developers Building the Pipeline

You have a generator library picked out and no reliable source of structured data to feed it.

Finance Teams with EU Entities

A US parent with a French or German subsidiary inherits the mandate through that entity.

Accounting Firms and Advisors

Clients arrive with archives of PDFs and a date on the calendar they cannot move.

Exporters Invoicing Europe

Customers begin asking for a hybrid file instead of the PDF you have always emailed them.

Common Search Terms

pdf to zugferd convert pdf to zugferd pdf to zugferd converter pdf to factur-x factur-x generator factur-x api zugferd converter factur-x format en 16931 hybrid invoice pdf xml cii xml invoice pdf/a-3 invoice

Document Types We Handle

Supplier invoices
Sales invoices
Credit notes
Scanned invoices
Multi-page invoices
Multi-invoice PDFs
Photographed invoices
Legacy PDF archives

Is Factur-X the same as ZUGFeRD?

Technically, yes. Since ZUGFeRD 2.0 the French and German specifications have been the same standard published under two names, and from version 2.1 they are identical. Both embed UN/CEFACT Cross Industry Invoice XML inside a PDF/A-3 container, both use the same profiles, and a file built to one specification is readable by tools built for the other. The names reflect national governance, not different technology.

That matters commercially, because it means one extraction and mapping project can serve both the French and the German obligation. You are not building two pipelines.

What a hybrid invoice actually contains

A ZUGFeRD or Factur-X invoice is one file that two different readers can use. A person opens it and sees a normal invoice page. A machine opens the same file, ignores the page, and reads the XML attachment. Nothing is duplicated in the sense of being sent twice, but the same facts do have to be present and consistent in both layers.

LayerWhat it isWho reads it
Visual layerA PDF/A-3 page, the archival PDF profile defined in ISO 19005-3, which permits arbitrary file attachmentsPeople: AP clerks, approvers, auditors
Data layerAn embedded CII XML file carrying the invoice fields as structured dataSoftware: ERPs, AP systems, tax platforms
MetadataXMP metadata declaring which specification and profile the file conforms toValidators and receiving platforms

The reason this format won adoption in France and Germany rather than pure XML is precisely that first row. Businesses did not want to give up a document a human can read, and small suppliers were never going to build XML pipelines on schedule.

The profiles, and which ones actually comply

Both specifications define the same ladder of profiles, from a bare minimum up to a fully extended set of fields. The choice is not cosmetic: it decides whether the file satisfies the mandate.

ProfileCarries line itemsAccepted for the German B2B mandate
MINIMUMNoNo, explicitly excluded
BASIC WLNo, header and totals onlyNo, explicitly excluded
BASICYes, a simplified setYes
EN 16931 (COMFORT)Yes, the full standard setYes, and the sensible default
EXTENDEDYes, plus additional fieldsYes
XRECHNUNGYesYes, the German public-sector implementation

The German Ministry of Finance guidance issued on 15 October 2024 confirms ZUGFeRD from version 2.0.1 meets the requirements, with MINIMUM and BASIC WL excluded. Practically, that pushes almost everyone to the EN 16931 profile, which is the profile that needs a real line-item table. If your extraction step only returns vendor, date, and total, you cannot reach it.

What each country requires, and when

FranceGermany
Must be able to receive1 September 2026, all VAT-registered businesses1 January 2025, receivers cannot refuse an e-invoice
Must issue, larger businesses1 September 2026, large and mid-sized companies1 January 2027, turnover above 800,000 euros
Must issue, smaller businesses1 September 2027, SMEs and micro-enterprises1 January 2028
Accepted formatsFactur-X, UBL 2.1, CII, aligned to EN 16931XRechnung, ZUGFeRD 2.0.1 and above excluding MINIMUM and BASIC WL, and other EN 16931 syntaxes including Factur-X and Peppol BIS Billing 3.0
RoutingThrough certified Approved Platforms, renamed from PDP to Plateforme Agreee in July 2025, connected to the public portalNo central platform mandated for the B2B exchange itself

Germany is the quieter obligation that already applies. Since January 2025 a German business cannot refuse a compliant e-invoice from a supplier, which means the receiving side of your process needs to work now, well before the 2027 issuing date.

The two halves of the problem, and which one we solve

Teams tend to discover this split about a week into the project. Generating a ZUGFeRD file is the easy half. There are mature open-source libraries for it, and the packaging step is deterministic: take a set of fields, write CII XML, attach it to a PDF/A-3, set the XMP metadata. Mustangproject on the Java side and the factur-x library on the Python side both do this well, and commercial PDF toolkits such as iText and PDFlib support it too.

The hard half is having correct fields to give the generator. That is a document-understanding problem across hundreds of supplier layouts, and it is the part that does not have a tidy library. This is where we sit: AI invoice data extraction reads any layout without per-vendor templates and returns the header fields and the complete line-item table as clean data. Developers usually take the structured JSON output and map it into the generator, and teams building it as a service call the invoice data extraction API directly.

Being blunt about the boundary: InvoiceExtractor does not write the PDF/A-3 file for you and is not a certified approved platform in France. If a vendor tells you one product does extraction, generation, transmission, and certification, ask which of those is actually certified, because those are four different things with four different failure modes.

Reading hybrid invoices you receive

Most coverage of this topic is about issuing. Receiving is the side that hits sooner and is easier to underestimate. From September 2026 in France and already today in Germany, some of your inbound invoices arrive as hybrid files while the rest stay ordinary PDFs, and both land in the same mailbox for months or years.

That mixed reality is awkward for an AP process built on one assumption. A hybrid file has perfect data inside it and should be read from the XML, never re-keyed and never put through OCR. A plain PDF has no data and needs extraction. The workable pattern is a single intake that checks for an embedded XML attachment first, uses it when it exists, and falls back to automated invoice data capture when it does not. Both paths then feed the same fields into your ledger, so downstream matching and approval do not care which route an invoice took.

Does this apply to a US company?

It applies through your customers and your entities, not through US law. There is no federal e-invoicing mandate in the United States, and the DBNAlliance exchange framework is voluntary. But a US company with a French or German subsidiary is inside those rules through that entity, and a US exporter selling to European business customers will be asked for compliant invoices by customers who now have their own obligation.

The practical trigger is usually a customer email rather than a regulator. Someone in a French accounts payable department writes to say that from September they need a Factur-X file instead of the PDF you have emailed for years. At that point the work is the same as it is for any European business, and it starts with getting your invoice data into structured form. For the wider picture of how these networks fit together, see our overview of e-invoicing and how it compares with the EDI 810 invoice that dominates in the US.

PDF to ZUGFeRD and Factur-X: Common Questions

Converting a PDF to ZUGFeRD takes two steps. First extract the invoice data from the PDF: seller, buyer, invoice number, dates, tax breakdown, totals, and every line item. Then pass those fields to a ZUGFeRD generator, which writes them as CII XML and embeds that XML in a PDF/A-3 container. The extraction step is the one that needs AI, because supplier layouts vary endlessly. The packaging step is handled by libraries such as Mustangproject or the factur-x Python library.

Yes, technically they are the same standard under two national names. Since ZUGFeRD 2.0 the specifications have been aligned, and from version 2.1 they are identical. Both embed UN/CEFACT Cross Industry Invoice XML in a PDF/A-3 file and share the same profiles, so a single pipeline serves both the French and the German requirement.

ZUGFeRD is a hybrid format: one PDF file that a person can read with structured XML embedded inside it. XRechnung is pure XML with no visual document at all, and it is the German implementation of EN 16931 used for public-sector invoicing. Both are accepted under the German B2B mandate. Choose ZUGFeRD when recipients still want to see a readable invoice, and XRechnung when the receiving system is fully automated.

Not for transactions in scope. A plain PDF is not an electronic invoice under EN 16931 because it carries no structured data, and emailing one will not satisfy the French or German requirement once your issuing date arrives. The hybrid formats exist precisely so you can keep sending something that looks like the PDF your customers know while the compliant data travels inside it.

Use the EN 16931 profile, sometimes called COMFORT, unless you have a specific reason to go higher. German guidance accepts ZUGFeRD 2.0.1 and above but explicitly excludes the MINIMUM and BASIC WL profiles, and BASIC WL carries no line items at all. EN 16931 is the level that holds the full line-item detail, which is why your extraction step has to return the whole table and not just the totals.

Yes. The visual layer must conform to PDF/A-3, the archival PDF standard defined in ISO 19005-3, because that is the version of PDF/A that allows arbitrary file attachments such as the invoice XML. All three conformance levels, PDF/A-3a, PDF/A-3b, and PDF/A-3u, are permitted. A validator will reject a hybrid invoice built on an ordinary PDF container.

There is no US federal e-invoicing mandate, so domestic US invoicing is unaffected and the DBNAlliance framework is voluntary. You are pulled in through a French or German subsidiary, or through European business customers who now have their own obligation and start asking for a compliant file instead of an emailed PDF. In practice the request usually arrives from a customer before it arrives from a regulator.