ZUGFeRD & Factur-X 6 min readPublished

Merge ZUGFeRD PDF Files Without Losing the Embedded XML

Want to merge a ZUGFeRD PDF with a delivery note or timesheet? Why page tools drop the XML, what the error looks like, safe ways to add attachments, and a check.

docutools.pro Editorial TeamEditorial Team

Key takeaways

  • A ZUGFeRD or Factur-X invoice is a PDF/A-3 file with an embedded XML; in Germany that XML has been the actual invoice since 1 January 2025.
  • Tools that copy pages drop file attachments, so the merged file is a plain PDF and, under German VAT law, no longer an e-invoice.
  • Printing to PDF transfers only the page image; our own merge tool also copies pages only and does not keep embedded files.
  • FeRD allows supporting documents as Base64 inside the XML (EN 16931 and EXTENDED profiles) or as an extra attachment in the original PDF.
  • After any edit, an extractor shows within seconds whether an invoice XML such as factur-x.xml is still inside the file.
On this page

You can merge a ZUGFeRD PDF with other files, but most PDF tools will silently drop the embedded XML, because they copy pages and the XML is not on a page. The result looks like the invoice but is no longer an e-invoice. Keep the received file unchanged, send attachments separately or through your invoicing software, and check every edited file with an extractor.

This guide is for accounts payable and billing teams, including foreign suppliers and shared-service centres that handle German invoices. It shows which everyday steps remove the XML, how to spot the damage, and where delivery notes, timesheets or approval stamps belong instead. For the format itself, read What is ZUGFeRD?.

The symptom: the PDF looks fine, the XML is gone

A typical sequence: a ZUGFeRD invoice arrives by e-mail, someone merges it with the delivery note or "prints" it to a new PDF, and later the accounting system refuses to import it as an e-invoice. On screen nothing has changed.

If you load such a file into our ZUGFeRD extractor, it shows "Extraction failed" with one of these messages:

This PDF has no embedded file attachments. It is a plain PDF, not a ZUGFeRD / Factur-X invoice.
An attachment was found, but none of them is a recognizable e-invoice XML. This PDF is probably not a ZUGFeRD / Factur-X invoice.

The first message means the file has no attachments at all. The second means some attachment survived, for example an embedded photo, but nothing that looks like an invoice XML.

Why this matters for German VAT

The German e-invoicing forum (Forum elektronische Rechnung Deutschland, FeRD) describes a ZUGFeRD invoice as a PDF/A-3 file for people to read plus an embedded XML file with the same invoice data. Each PDF/A-3 document carries exactly one invoice XML, named factur-x.xml or, in the XRECHNUNG profile, xrechnung.xml. Since 1 January 2025, FeRD says, this embedded XML is the invoice in Germany; the PDF is only a copy with identical content.

Without the XML, what is left is an invoice "in another electronic format" under Section 14(1) of the German VAT Act (§ 14 UStG) (opens in a new tab), which German law calls an "other invoice" (sonstige Rechnung). The difference is explained in What is a structured e-invoice?. For a German buyer, the merged file is no longer the e-invoice it received.

Why does the XML disappear? Causes, most common first

The XML is attached to the PDF document as a whole, not to a page. Any process that builds a new PDF out of pages leaves it behind.

ActionWhat happens to the XMLSafer route
Merging several PDFs into onePage-based tools copy pages only; attachments and the PDF/A-3 identification are missing in the outputKeep the original separately; use the merged file as a copy only
"Print to PDF" or a virtual PDF printerOnly the page image is printed; embedded files are never transferredDo not use it for e-invoices
Deleting, rotating or reordering pagesDepends on the program: some save the file with its attachments, others rebuild it from pagesAlways check the result with an extractor
Compressing or "optimising" the PDFSome optimisers remove embedded files to save spaceDo not compress the original
Printing and scanning back inOnly an image remains; the e-invoice becomes a scanFile electronic invoices electronically
Changing text or an amount in a PDF editorThe XML stays as it was; PDF and XML now contradict each otherIssue a correction from the invoicing software

Two rows are about how the technology works, not about a specific product: printing never carries file attachments, and a page copier only knows pages. For editors, signing tools and optimisers, the outcome depends on the product and its settings, so check the saved file instead of assuming.

Our own tool to merge PDF files belongs in the first row. It creates a new file called merged.pdf and copies the pages of the selected PDFs into it. It does not carry over embedded files or the PDF/A-3 identification, and the same applies to the "Split / Extract" tab. Use it for delivery notes, measurement sheets or photos, never for the e-invoice itself.

How to fix it, case by case

Case 1: you merged an invoice you received

  1. Find the original file from the e-mail or the supplier portal. That file is the e-invoice.
  2. Check the original in the extractor. If "E-invoice XML found" appears with a file name, the XML is there.
  3. Store the original unchanged in your archive. You may keep the merged file as an additional working copy.
  4. If the original is lost, ask the supplier to send the same invoice again.

The reason is retention: § 14b(1) UStG (opens in a new tab) requires businesses to keep received invoices for eight years. The FeRD FAQ also refers to margin number 131 of the GoBD of 28 November 2019, under which electronic documents must be kept in the format in which they were received. Our guide to e-invoice archiving in Germany covers the details.

Case 2: you issue invoices and need to send attachments

Do not add timesheets or delivery notes afterwards with a PDF editor. FeRD names two routes, both taken when the invoice is generated:

RouteProfilesWhere the attachment lives
Base64-encoded inside the XMLEN 16931 and EXTENDEDin group BG-24 "Additional supporting documents" of the invoice XML
Further file attachment in the PDFall profilesnext to factur-x.xml as an extra embedded file
Separate file in the same e-mailany profileas its own e-mail attachment, outside the invoice

The first route suits automated processing best, because the attachment travels inside the invoice data. How BG-24 works with a reference (BT-122) and Base64 content (BT-125) is shown in XRechnung attachments; in CII the attachment sits in ram:AdditionalReferencedDocument. The third route is the simplest when your software cannot embed attachments.

Case 3: the invoice contains an error

Do not change an amount or a date in the PDF. The XML stays as it was, and FeRD makes clear that the structured data prevails when the two parts disagree. A buyer who processes the XML will not see your edit. Create the correction in your invoicing software, so that PDF and XML are generated again and match.

Case 4: you need an approval or receipt stamp

Notes such as "approved" or the cost-centre coding belong in your accounting or document management system, not inside the invoice file. If you stamp the PDF anyway, you save a modified file; whether its attachments survive depends on the program. The original remains the record either way.

How to prevent it at the source

  • Store the original first. Set up invoice intake so the received file is saved before anyone edits it.
  • Attachments through the invoicing software. Find out whether your software embeds attachments in BG-24 or adds them as a further PDF attachment. If it does neither, send attachments as separate files.
  • No printer drivers as converters. A virtual PDF printer is unsuitable for e-invoices, however good the output looks.
  • Know the profile. According to FeRD, attachments inside the XML are only foreseen in EN 16931 and EXTENDED. Which profiles count as an e-invoice at all is explained in ZUGFeRD profiles and versions.
  • Check after every edit. A look at the extractor takes less than a minute.

PDF/A errors alone do not invalidate a ZUGFeRD invoice: according to FeRD, technical deviations from the PDF/A standard count only as warnings, as long as the XML is valid and can be extracted. The buyer may still ask for a corrected, PDF/A-conformant version. What matters most is that the XML is still in the file.

How to check an edited ZUGFeRD PDF with docutools.pro

The extractor runs entirely in your browser; the PDF does not leave your computer.

  1. Open the extractor and select the edited file with "Choose PDF". The free tier handles one PDF at a time; several PDFs in one go require the Pro plan.
  2. If "E-invoice XML found" appears with a file name such as factur-x.xml, the XML is still embedded. If "Extraction failed" appears, it is gone; go back to the original.
  3. Look at "Other attachments in this PDF" to see whether attachments sent with the invoice are still there.
  4. Compare the "Invoice summary" with the page image: invoice number, date and amounts must match.
  5. Save the XML with "Download XML" and open it in our ZUGFeRD validator if you want to check the content. The viewer uploads the XML to our server for this. It checks files that carry the EN 16931 profile identifier against the EN 16931 rules, and for BASIC and EXTENDED it reports "No official validation scenario matches this file".

After that, you can bundle delivery notes, measurement sheets or photos with the "Merge & Split PDF" tool, as long as the e-invoice stays a separate file next to them. How to read all three layers of a ZUGFeRD invoice is covered in Open a ZUGFeRD invoice. More guides are collected under ZUGFeRD and Factur-X.

Sources

Last reviewed: November 2026

This article is general information, not tax or legal advice.

Tags:ZUGFeRDFactur-XPDF/A-3e-invoicing

Tools for this article

Frequently asked questions

Can I combine a ZUGFeRD invoice and the delivery note into one PDF for our archive?

Only as an extra working copy. Keep the received file unchanged. Under Section 14b of the German VAT Act (§ 14b UStG) invoices must be kept for eight years, and the German bookkeeping principles (GoBD, margin number 131) require electronic documents to be kept in the format in which they were received. A merged file from a page tool usually no longer contains the XML.

Is a Factur-X file the same as a ZUGFeRD file when merging?

Yes, the risk is identical. According to the German e-invoicing forum FeRD, ZUGFeRD and Factur-X have been the same format since version 2.0. Both are PDF/A-3 files with one embedded invoice XML, usually called factur-x.xml. Any tool that rebuilds the PDF from pages drops that XML, whatever name the format has in your country.

How do I add a timesheet to a ZUGFeRD invoice?

Through your invoicing software, not a PDF editor. FeRD states that supporting documents can be embedded Base64-encoded in the XML in the EN 16931 and EXTENDED profiles. In all profiles they can also be added as a further file attachment inside the PDF. Both must happen when the invoice is generated, so the XML and the PDF/A-3 container stay intact.

What happens if I only change the amount in the PDF?

The visual part and the data part then disagree, and the XML still decides. FeRD points out that since 1 January 2025 the structured data is the leading part of a hybrid invoice in Germany. An amount changed in the PDF therefore does not change the invoice. Issue a correction as a new invoice from your invoicing software instead.

Topic hubMore on ZUGFeRD & Factur-XHybrid e-invoices made of PDF/A-3 plus embedded XML: profiles, versions, creation and validation of ZUGFeRD and Factur-X.