ZUGFeRD invoices are not just PDFs with an XML file stapled on. The format was built with long-term archiving in mind from the start, and understanding why it uses PDF/A-3 — rather than ordinary PDF — matters if you want to stay on the right side of Swiss archiving rules.
This post covers what Swiss law actually requires for invoice retention, why PDF/A-3 is the right container format for hybrid e-invoices, and what you need to check before declaring your archive compliant.
What Swiss law requires for invoice retention
Swiss archiving obligations for business documents come from two main sources: the Code of Obligations (OR Art. 958f) and the Ordinance on the keeping and retention of books of account (GeBüV). Together they set out the rules that matter for your invoice archive:
- Invoices must be retained for ten years from the end of the financial year in which they were issued.
- They must be stored in a way that ensures authenticity (the document has not been altered since it was created) and integrity (you can prove it).
- They must remain legible and reproducible throughout the entire retention period — meaning the format must still be readable in 2036 if you archived something in 2026.
- Electronic archives must use tamper-evident methods, typically achieved through digital signatures, audit logs, or write-once storage.
What the law does not do is mandate a specific file format. It does not say "you must use PDF/A-3". What it says, in effect, is that whatever format you choose must still be readable and verifiable a decade from now. That is where PDF/A-3 earns its keep.
Why ordinary PDF is not good enough for long-term archiving
Standard PDF files have a problem: they can reference resources that live outside the file. Fonts, colour profiles, and embedded content can be stored externally and just referenced by the PDF. In practice this means that a PDF which looks perfect today might render incorrectly — or not at all — if those external dependencies are no longer available years down the line.
PDF/A is the ISO standard (ISO 19005) that fixes this by requiring full self-containment. Every resource the document needs — fonts, colour profiles, metadata — must be embedded inside the file. Nothing can be pulled in from outside at render time. The result is a file that will display identically in any compliant viewer, regardless of what software or operating system it runs on.
There are several PDF/A versions. PDF/A-1 and PDF/A-2 both prohibit file attachments, which is a problem if you want to embed an XML invoice payload. PDF/A-3 relaxes this restriction and explicitly allows arbitrary file attachments — including machine-readable XML. That is exactly what ZUGFeRD and its French twin Factur-X use: a human-readable PDF/A-3 wrapper with the structured XML embedded inside.
How ZUGFeRD uses PDF/A-3
When a ZUGFeRD invoice is generated, the invoice XML — structured according to UN/CEFACT CII (Cross Industry Invoice) — is embedded into the PDF as an attachment. The attachment is named factur-x.xml (or ZUGFeRD-invoice.xml in older 1.0 files) and its relationship to the PDF is declared in the document's XMP metadata.
The PDF/A-3 conformance level ensures:
- The visual invoice (what a human reads) is permanently and faithfully renderable, with no external dependencies.
- The machine-readable XML (what your ERP reads) travels with the document and cannot be separated from it accidentally.
- The XMP metadata declares the profile level (MINIMUM, BASIC, EN 16931, EXTENDED) so a receiving system knows exactly what data to expect in the XML.
This is what makes ZUGFeRD a genuinely hybrid format rather than just a PDF with a text file attached. The two representations are linked and travel together — archive one, you archive both.
What to check before calling your archive compliant
Having PDF/A-3 files is necessary but not sufficient for a compliant archive. Here is what else needs to be in place:
Conformance validation at ingest. Do not assume that every ZUGFeRD file you receive is actually valid PDF/A-3. Suppliers make mistakes. Some generate PDFs with the ZUGFeRD label but without proper PDF/A-3 conformance. Run validation — tools like veraPDF (open source) or commercial validators — when documents enter your archive, not years later when you discover a problem.
Immutability after archiving. Once an invoice is archived, it must not be modifiable. Write-once storage (WORM), a document management system with audit trails, or qualified timestamps all serve this purpose. A folder of files on a shared network drive with no access controls does not.
Index and retrieval. Swiss auditors and tax inspectors have the right to request specific invoices. Your archive must support retrieval by invoice number, supplier, date, and amount within a reasonable time. If your archive is a flat folder of ten thousand PDF/A-3 files with no indexing, you technically have the documents but you will struggle to produce them on demand.
Retention period tracking. You need a way to know when each document's ten-year period expires. Many document management systems handle this automatically. If yours does not, a simple database or spreadsheet that records the archive date per document is better than nothing.
Format migration policy. PDF/A-3 is a solid long-term format, but no format is guaranteed to remain accessible indefinitely. A responsible archiving policy includes a commitment to migrate documents if the format standard is deprecated or reader availability drops. In practice this is unlikely to be a problem with PDF/A-3 in the near term, but having the policy written down matters for audits.
What about invoices received as pure XML — no PDF wrapper?
If you receive invoices via PEPPOL in UBL or CII XML format with no PDF at all, the PDF/A-3 question becomes moot for the original file — but you still need to satisfy the same archiving obligations. The XML must be stored in a format that remains legible and verifiable for ten years. Many organisations solve this by generating a PDF/A-3 rendering of the XML on receipt and archiving both. Others use XML-native archive solutions with schema version tracking. Either approach works, as long as you can prove the document has not been altered and can be reproduced.
For invoices received via eBill, the eBill platform itself holds transaction records, but you are still responsible for your own archive. Do not assume the platform covers your retention obligation.
Practical next steps
If you are setting up a ZUGFeRD archive for the first time, the short checklist looks like this:
Start with a validator. Run every incoming ZUGFeRD file through a PDF/A-3 validator at ingest and reject or flag non-conforming files immediately. This is far easier than auditing your archive retrospectively.
Choose storage that enforces immutability. A qualified document management system with audit logging is the cleanest solution. If you are using cloud storage, look for WORM-capable options.
Make sure your indexing covers the fields an auditor will ask for. Invoice number, supplier UID, invoice date, and net and gross amounts are the minimum.
Document your archiving policy. Swiss tax authorities expect you to be able to describe your process, not just produce the files. A one-page written policy covering format, storage, access controls, and retention periods will save time if you are ever inspected.
The ZUGFeRD format does most of the heavy lifting on the document side — PDF/A-3 and the embedded XML together satisfy the machine readability and authenticity requirements cleanly. The gaps in most archives are on the process side: no validation at ingest, mutable storage, and no written policy. Fix those and you are in good shape.