Free tier

← All guides · Formats & conversion

How to verify a Factur-X PDF really contains its XML invoice

By the Ingenious AI team · Published 14 November 2026 · Reviewed 14 November 2026

Convert an invoice free

Put this guide into practice now: convert one invoice free — validated UBL 2.1 XML plus a Factur-X PDF, with the acceptance checker for your client’s country. See pricing for bulk conversion, country rule packs and monitored clients.

Short answer

To verify a Factur-X PDF, check that it carries an attachment named factur-x.xml, extract it, parse it as the invoice XML, and compare its figures (number, lines, totals) against the readable page. This product's builder is tested exactly that way: its extract_embedded function pulls the XML back out of generated PDFs and proves the embedded invoice is present and byte-identical to the standalone UBL download.

What is being verified?

The verification target is the hybrid's core promise: the PDF's embedded XML is the invoice — present, parseable and identical to the structured copy. The Factur-X builder here attaches the validated UBL as 'factur-x.xml' (PDF/A-3 style attachment) to the readable PDF, and its extract_embedded() 'proves the XML really is inside the PDF — used by the test suite and cold verification'. A Factur-X file failing that check is a plain PDF with a claim attached.

Why verification is necessary at all

Hybrid formats run on trust with a mechanism: the reader trusts the page, the system trusts the attachment, and both trust that they describe one invoice. That trust is warranted only if the attachment exists and matches — two facts that cannot be seen by opening the PDF and reading it, because the whole point of the format is that the data layer is invisible to the casual reader. Anything invisible and load-bearing deserves a check.

The market makes the check necessary, too: 'e-invoice PDF' is an easy label to print on an ordinary PDF, and some tools produce PDFs whose XML is absent, stale or generated from different data than the page shows. Verification separates the format from the label in about a minute — and a supplier who verifies incoming hybrids protects their own books from booking a page's figures while the system ingests a different XML's.

The three checks: present, parseable, identical

Present: open the PDF's attachments (any serious PDF reader shows them) and confirm factur-x.xml (or, in the ZUGFeRD naming, zugferd-invoice.xml) is attached. Parseable: extract the attachment and open it as XML — it should be a well-formed invoice document whose root and elements are the UBL invoice structure, not an error message or an empty shell. Identical: compare the extracted invoice's number, dates, parties, line totals and payable amount against the readable page and against the standalone XML if you received one.

Each check catches a different failure: absence (a labelled plain PDF), corruption (a malformed attachment no system can ingest), and divergence (page and data telling different stories — the dangerous one, because each audience believes its own layer). A hybrid passing all three can be filed with confidence by both audiences, which is the format's entire reason to exist.

How the product proves it on every build

The builder's construction removes divergence by design: one dataset generates the readable page and the XML, and the XML is attached unchanged — byte-identical to the standalone download. The test suite then refuses to take the construction's word for it: extract_embedded reads generated PDFs back, finds the attachment by name, decodes it, and the tests compare it — the same three checks, mechanised, run against the code on every test pass.

That pattern — build carefully, then verify as if you hadn't — is worth copying into any document pipeline you operate. It is also why conversions here produce the PDF only after validation passes: an invalid invoice never gets the chance to become a beautiful, verified container for bad data. Container integrity and content validity are separate virtues, and the order matters: content first, then the proof that the container kept it intact.

Receiving-side practice

If your business receives Factur-X invoices, build the three checks into intake — even manually, at first: attachments present, XML extracted and parsed by your accounting import, figures agreed with the page before approval. Where the XML and page disagree, stop: the discrepancy is the finding, and querying it with the supplier protects you from paying one figure while booking another. Careful suppliers welcome the query, because their construction makes disagreement impossible and the question proves you read their invoice properly.

Over time, the receiving habit teaches the market. Suppliers whose hybrids are verified get booked without friction; suppliers whose 'Factur-X' files keep failing extraction get asked for the standalone XML instead — a polite, permanent demotion. Verification is thus not pedantry but procurement hygiene: it prices the label at its true value, invoice by invoice.

Sending-side practice

As a sender, assume your hybrids will be verified — by mandate-country systems mechanically, by careful clients procedurally. Send only PDFs generated with their XML in the same act (as conversions here do), never a PDF you assembled by attaching a separately produced XML to a separately produced page: two sources guarantee eventual divergence, and divergence discovered by a client's intake reads as carelessness at best.

Keep the standalone XML with the PDF in your archive regardless. If a client ever questions the hybrid, the pair answers: the XML you sent standalone and the XML inside the PDF are the same bytes — a claim you can demonstrate in seconds by extraction and comparison, turning a potential dispute about formats into a small, satisfying proof.

Verifying a Factur-X PDF in 5 steps

  1. Open the PDF's attachments panel and confirm factur-x.xml (or zugferd-invoice.xml) is present.
  2. Extract the attachment and confirm it parses as a well-formed UBL invoice document.
  3. Compare number, dates and payable amount between the extracted XML and the readable page.
  4. If a standalone XML accompanied the PDF, compare bytes or figures — they must be identical.
  5. File the result with the invoice; a hybrid that fails any check goes back to the sender as a plain-PDF problem.

Worked example: the hybrid that wasn't

A firm receives a 'Factur-X' invoice for EUR 8,940.00. The attachments panel is empty — no factur-x.xml. The readable page is immaculate; the format claim is false. The firm's intake treats it as what it is, a plain PDF, and asks the supplier for the structured invoice or a true hybrid. The supplier, whose tool had merely labelled its output, converts the invoice properly — here, in minutes — and resends a Factur-X PDF whose attachment extracts, parses and matches the page to the cent.

Nobody was defrauded; a label was simply priced correctly. The receiving firm's one-minute check prevented a manual booking, a mismatched archive and a precedent that labels substitute for data. Multiply that minute across a year of intake and verification is the highest-yielding habit in the payables office.

Frequently asked questions

Where do I find a PDF's attachments?

In a full PDF reader's attachments panel (or via tools that list embedded files). The Factur-X attachment is named factur-x.xml; ZUGFeRD files may name it zugferd-invoice.xml — this product's extractor accepts both names.

What if the XML is present but the figures differ from the page?

Treat it as a defective invoice: query it with the supplier before booking or paying. Page and data must describe one invoice; a divergence means the file was not generated from a single dataset.

How does this product guarantee identity?

By construction and by test: the same validated dataset generates page and XML, the XML is attached unchanged (byte-identical to the download), and the test suite extracts it back from generated PDFs to prove presence and content.

Can I verify a hybrid without special software?

Yes for the basic checks: a PDF reader shows attachments, and the extracted XML opens in any text editor for figure comparison. Accounting imports provide the parse check.

Is a PDF without the attachment still an invoice?

As a document between the parties, it is a PDF invoice — with all the mandate-era limits that carries. It is not a Factur-X invoice, whatever its file name or its sender calls it.

Keep going

Run the free tool this guide is about: convert an invoice · acceptance checker · pricing · about EInvoice Translator · all guides

Related guides

← Back