Guide
Extract XML from a Factur-X or ZUGFeRD PDF
Find the embedded XML in a Factur-X or ZUGFeRD invoice, check its profile and compare its data with the PDF while keeping the original unchanged.
A hybrid invoice contains a readable presentation and embedded structured data. Extracting that data lets you inspect it or pass it to a compatible tool. Extraction should not rewrite the received document or replace the accounting original. Keep those purposes separate throughout the process.
Start with the original file
Use the PDF downloaded from the receiving channel. Avoid a copy made with a virtual printer: it may have lost embedded attachments. Open the file in KlarFakt’s hybrid viewer and inspect the detected information. If no invoice XML is recognised, investigate that result instead of arbitrarily renaming another attachment.
Compare both representations
Check number, date, seller, buyer, currency and totals. If the PDF shows a different amount from the XML, ask the issuer to clarify. Editing only one representation leaves the document inconsistent. Also note the declared profile, because the data present depends on the Factur-X or ZUGFeRD profile.
Check the extracted XML
Use checks matching the supported profile and read the report’s stated limits. Successful extraction certifies neither PDF/A, a signature nor overall tax compliance. Retain the original PDF, extracted XML and validation result with names allowing them to be matched. Request a new export from the issuer if the required structure is missing. Do not attach guessed data to an existing invoice just to obtain a successful detection.
Check your own case reproducibly
Work on a copy first and retain the unchanged original. Record the expected result, the action actually performed and the software version used. Afterwards, compare the document number, parties, currency and amounts with the original invoice. Investigate any difference before reusing the result. A small anonymised example is more useful for diagnosing a failure than indiscriminately sharing complete customer records. Repeat the test after changing an export setting and, where relevant, confirm that the actual business partner can receive and process the resulting document.
Sources and next steps
Tools for this topic
More guides
- The ZUGFeRD and Factur-X profiles explained, from MINIMUM to EXTENDED
- E-invoicing in France 2026–2027: who is affected, when, auto-entrepreneurs too
- XRechnung vs ZUGFeRD: which e-invoice format for which invoice
- Archive electronic invoices: which files should you keep?
- Prepare a PDF invoice pack with ImgPact
- PDF invoice or electronic invoice: what is the difference?
No legal advice. Dates and obligations follow the official publications cited in the text; where a date is not final, the text says so.