How to see the XML inside a ZUGFeRD or Factur-X PDF

The PDF looks like any invoice, yet your accountant says it contains structured data. That data is an XML file hidden inside the PDF as an attachment.

Updated

On this page
  1. From difficult file to readable document.
  2. Why there is XML in a PDF
  3. How to tell whether your PDF has XML
  4. Keep the PDF intact
  5. A word on checks
  6. Step by step on iPhone, iPad and Mac
  7. What if the numbers differ
  8. Hybrid invoices and privacy
  9. Why accountants ask for the original
  10. Related checks worth doing
  11. If the document does not display as expected
  12. Questions about this file type.

From difficult file to readable document.

  1. Save the original PDF

    Download the invoice from the email or portal and store it unchanged. Do not print it to PDF, scan it or run it through a compression tool, because these can drop the embedded attachment.

  2. Open it in an invoice-aware app

    In EU Docs, choose the PDF. For supported Factur-X and ZUGFeRD files the app reads the embedded invoice XML alongside the PDF preview.

  3. Compare data and page

    Check that invoice number, supplier, VAT and total in the structured data match the printed page, then pass on the original PDF.

Why there is XML in a PDF

Accounting software wants structured data, people want a readable page. A hybrid invoice delivers both in one file: the PDF is the visual representation and the XML, based on UN/CEFACT Cross Industry Invoice, is the machine-readable source.

That also means a plain PDF viewer will not warn you if the two disagree. The check is worth doing for large amounts.

How to tell whether your PDF has XML

Some PDF readers show an attachments panel and list a file with a name such as factur-x.xml or zugferd-invoice.xml. If you see one, the PDF is a hybrid. If you do not, it is either an ordinary PDF or your reader hides attachments. Opening the PDF in EU Docs removes the guesswork: supported hybrids show their invoice data, ordinary PDFs open as normal PDFs.

Keep the PDF intact

The embedded XML is part of the PDF file. Anything that regenerates the PDF can strip it, including printing to PDF, re-saving through some editors and mail clients that convert attachments. If you need a smaller copy for sharing, keep the original in your archive.

A readable PDF exported from EU Docs is a separate convenience copy generated from supported fields. It does not replace the received hybrid invoice.

A word on checks

EU Docs checks EN 16931 arithmetic, required fields and identifier check digits, and checks supported signatures offline. These checks help you spot problems and are not an official validation.

Step by step on iPhone, iPad and Mac

Save the PDF to Files or a Finder folder. Open it with EU Docs. If the PDF contains supported Factur-X or ZUGFeRD data you will see the readable invoice fields with the PDF preview. Review seller, buyer, lines, tax and totals. If you need the XML as a separate file for your accounting software, keep the original PDF and import it there, since most accounting tools read the embedded data directly.

What if the numbers differ

If the embedded data and the visible page disagree, contact the supplier and ask for a corrected invoice. Do not edit the PDF yourself. Keep both versions until the matter is settled. The structured data is what automated systems read, so a mismatch can cause a wrong booking even if the printed page looks right.

Hybrid invoices and privacy

Embedded XML often holds more detail than the printed page, such as bank details and buyer references. Treat the file like any other financial document and avoid sending it through online viewers.

Why accountants ask for the original

Accounting packages that support hybrid invoices read the XML straight from the PDF, which avoids retyping and the errors that come with it. If you forward a flattened copy, the package may have to treat it as an ordinary document and someone must key in the figures again. Sending the original PDF, exactly as received, is the simplest way to avoid that.

If you forward invoices from a phone, use the share sheet on the original file rather than taking a screenshot or exporting a new PDF.

Related checks worth doing

Compare the supplier’s VAT number and IBAN with earlier invoices. EU Docs checks VAT number and IBAN check digits and warns when a supplier’s IBAN differs from invoices saved in your dossiers. A changed IBAN on an otherwise normal invoice is a classic sign that something deserves a phone call to the supplier.

If the document does not display as expected

Keep the original filename and check that the download is complete. Renaming XML, P7M or ASiC files to PDF does not convert them. If a signed container opens, check the type of its extracted payload: it may be an invoice, PDF or another format requiring its own reader.

For an invoice, compare the document identifier, supplier, currency, tax and total with the original fields. Report an unsupported format with its non-sensitive format/version details; avoid sending private documents unless you choose an appropriate support channel.

Authoritative references

Official specifications and public-sector documentation used to check the terminology in this guide.

Questions about this file type.

Can I extract the XML from a ZUGFeRD PDF?

Yes, the XML is an embedded attachment. EU Docs shows the invoice data read from it; other PDF tools with an attachments panel can also save the XML file.

Is a Factur-X PDF the same as a normal PDF invoice?

It looks the same, but it contains embedded structured XML that accounting software can import.

Does opening the file upload it?

No. EU Docs processes the file on the device.