PDF/A Format with Embedded XML for Peppol: Requirements and How to Fix
You attached a PDF to your Peppol invoice and got an error: "invoices must be in PDF/A format with embedded XML." This means your PDF does not comply with the PDF/A archival standard that Peppol requires for document attachments. Here is what PDF/A is, why Peppol requires it, and how to fix the error.
The error
Invoices must be in PDF/A format with embedded XMLWhat is PDF/A?
PDF/A (ISO 19005) is a specialized version of PDF designed for long-term digital preservation. Unlike regular PDFs, PDF/A files are completely self-contained. All fonts are embedded. JavaScript is prohibited. External references are not allowed. Color profiles are mandatory. This ensures the document will render identically on any system, now and decades from now.
| Feature | Regular PDF | PDF/A |
|---|---|---|
| Fonts | Can reference external fonts | All fonts must be embedded |
| JavaScript | Allowed | Prohibited |
| External links | Allowed | Not allowed |
| Color profiles | Optional | Required (ICC profiles) |
| File attachments | Allowed | Only in PDF/A-3 |
| Encryption | Allowed | Prohibited |
| Long-term archival | Not guaranteed | Guaranteed by design |
PDF/A versions explained
There are three main versions of PDF/A. The version you need depends on what you are doing:
PDF/A-1 (ISO 19005-1:2005)
Based on PDF 1.4. The original archival standard. Does not support file attachments or transparency. Sufficient if you just need a visual PDF attached to a separate UBL invoice.
PDF/A-2 (ISO 19005-2:2011)
Based on PDF 1.7. Adds support for JPEG 2000 compression, transparency, and layers. Still no arbitrary file attachments. Can only embed other PDF/A files.
PDF/A-3 (ISO 19005-3:2012)
Based on PDF 1.7. The key addition: allows embedding any file type as an attachment. This is the version needed for hybrid invoices (Factur-X, ZUGFeRD) where the XML invoice data is embedded inside the PDF.
Hybrid invoices: Factur-X and ZUGFeRD
A hybrid invoice combines both worlds: a human-readable PDF and a machine-readable XML in a single file. The PDF/A-3 format makes this possible by allowing the XML to be embedded as an attachment inside the PDF.
Two standards use this approach:
- Factur-X (France/Germany joint standard): Embeds a CII (Cross Industry Invoice) XML file named
factur-x.xmlinside a PDF/A-3 document. - ZUGFeRD 2.x (Germany): Technically identical to Factur-X. The XML file is named
factur-x.xml(since ZUGFeRD 2.0 aligned with Factur-X).
These hybrid formats are gaining traction in Europe because they bridge the gap between human and machine processing. The recipient can view the PDF like a traditional invoice, while automated systems extract the XML data. Read our ZUGFeRD format guide for more details on profiles and implementation.
When does Peppol require PDF/A?
Peppol BIS Billing 3.0 allows you to attach additional documents to an invoice using the AdditionalDocumentReference element. When you embed a PDF representation of the invoice, many access points require PDF/A format. This is especially true for:
- Invoice visual representations attached to UBL invoices
- Supporting documents (contracts, delivery notes) attached as PDFs
- Hybrid invoice workflows where Factur-X/ZUGFeRD documents are converted to Peppol UBL
How to attach a PDF/A to a Peppol invoice
In UBL, you attach the PDF/A using the AdditionalDocumentReference element with the document embedded as base64:
<cac:AdditionalDocumentReference>
<cbc:ID>Invoice-PDF</cbc:ID>
<cbc:DocumentDescription>
Invoice visual representation
</cbc:DocumentDescription>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject
mimeCode="application/pdf"
filename="invoice-2026-001.pdf">
<!-- Base64-encoded PDF/A content -->
JVBERi0xLjQKJeLjz9MKMSAwIG9iago...
</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>How to convert PDF to PDF/A
If your system generates regular PDFs, you need to convert them to PDF/A before attaching to a Peppol invoice. Here are the most common approaches:
Ghostscript (free, command-line)
The most common approach for automated workflows. Works on Linux, macOS, and Windows.
gs -dPDFA=3 -dBATCH -dNOPAUSE -dNOOUTERSAVE \
-sColorConversionStrategy=UseDeviceIndependentColor \
-sDEVICE=pdfwrite \
-dPDFACompatibilityPolicy=1 \
-sOutputFile=output-pdfa3.pdf \
input.pdfLibreOffice (free, GUI or CLI)
Can export directly to PDF/A from documents. Also works as a command-line converter.
libreoffice --headless --convert-to \
"pdf:writer_pdf_Export:{\"SelectPdfVersion\":3}" \
input.docxAdobe Acrobat Pro (commercial)
File → Save as Other → PDF/A. Choose PDF/A-3b for hybrid invoices or PDF/A-1b for simple attachments. Acrobat also has a Preflight tool that validates PDF/A compliance.
How to validate PDF/A compliance
After conversion, verify that your PDF is actually valid PDF/A. Common validation tools:
- veraPDF (free, open-source): The reference PDF/A validator. Command-line and GUI versions available.
- Adobe Acrobat Preflight: Built-in PDF/A validation and correction.
- PDF/A Pilot (commercial): Batch validation and conversion.
# Validate with veraPDF
verapdf --flavour 3b output-pdfa3.pdf
# Expected output for valid PDF/A-3b:
# compliant: trueSkip the PDF/A conversion
With e-invoice.be, send your invoices as regular PDF via email. We handle the PDF/A conversion, XML generation, and Peppol delivery automatically. You can also use our Factur-X converter or ZUGFeRD converter to convert hybrid invoices to Peppol UBL.
Frequently asked questions
Why must Peppol invoice attachments be in PDF/A format?
Peppol requires PDF/A (ISO 19005) for attached invoice representations because PDF/A guarantees long-term archival quality. Regular PDFs can contain JavaScript, external font references, and other elements that may not render correctly in the future. PDF/A is self-contained and ensures the document looks the same in 10 years as it does today.
What is the difference between PDF and PDF/A?
PDF/A is a subset of PDF designed for long-term archiving. It requires all fonts to be embedded, prohibits JavaScript and multimedia, disallows external references, and requires color profiles. A regular PDF may depend on external resources that could become unavailable. PDF/A is fully self-contained.
What is a hybrid invoice (Factur-X / ZUGFeRD)?
A hybrid invoice is a PDF/A-3 file that contains both a human-readable PDF representation and a machine-readable XML file (CII or UBL) embedded as an attachment. The PDF/A-3 standard allows file attachments, which PDF/A-1 and PDF/A-2 do not. Factur-X (France) and ZUGFeRD (Germany) are the main hybrid invoice standards in Europe.
Which PDF/A version do I need for Peppol?
If you are embedding XML inside the PDF (hybrid invoice), you need PDF/A-3 because only PDF/A-3 supports file attachments. If you are just attaching a plain PDF representation to a UBL invoice, PDF/A-1b or PDF/A-2b is sufficient. Check your access point requirements for the specific conformance level needed.
How do I convert a regular PDF to PDF/A?
You can convert PDFs to PDF/A using tools like Ghostscript (free, command-line), LibreOffice (free, GUI), or commercial solutions like Adobe Acrobat. The conversion embeds all fonts, removes JavaScript, and adds the required metadata. For automated workflows, Ghostscript with the PDFA_def.ps profile is the most common approach.
What is the error 'invoices must be in PDF/A format with embedded XML'?
This error means you tried to attach a regular PDF to your Peppol invoice, but the access point requires PDF/A format. Convert your PDF to PDF/A-3 format if you need to embed XML, or PDF/A-1b if it is just a visual representation. Then re-attach and send again.