PDF/A with Embedded XML vs Peppol UBL: Hybrid Invoices, PDF Attachments and Fixes
A PDF/A-3 with embedded XML (Factur-X, ZUGFeRD) and a Peppol UBL invoice solve the same problem in two different ways. Here is when each one applies, how to embed a PDF in UBL without validation errors, and what Belgium expects.

Written by
Tom Van Asbroeck
Last updated: · 14 min read
Expert verified

A PDF/A with embedded XML is a hybrid invoice. One PDF/A-3 file holds a readable invoice and a machine-readable XML file. Factur-X and ZUGFeRD work this way. Peppol works the other way round. The XML (UBL) is the invoice, and a PDF can travel inside it as an optional attachment. This guide explains both models, when each one applies, and how to embed a PDF in a Peppol UBL invoice without validation errors.
The short answer
- Hybrid invoice: PDF/A-3 container with a CII XML inside (
factur-x.xml). Used for Factur-X (France) and ZUGFeRD (Germany). - Peppol invoice: a Peppol BIS 3.0 UBL XML file. The XML is the legal invoice. Peppol does not transport hybrid PDFs as invoices.
- PDF inside UBL: optional, in
cac:AdditionalDocumentReferencewithmimeCode="application/pdf"and a mandatoryfilename. - PDF/A on Peppol: not required by any Peppol BIS 3.0 rule (version 3.0.21, checked November 2026).
- Size: no limit in the specification. Base64 adds about 33%. Receivers set their own limits.
- Belgium: the PDF is not mandatory and has no legal value of its own. The UBL is the invoice.
Got this error?
Invoices must be in PDF/A format with embedded XMLThis is not a Peppol validation rule. It comes from a receiver, portal or software that expects a hybrid invoice (Factur-X or ZUGFeRD). A plain PDF fails, and so does a PDF/A without an XML inside. Jump to how to fix it.
What is PDF/A?
PDF/A (ISO 19005) is a version of PDF built for long-term archiving. A PDF/A file is self-contained. All fonts are embedded. JavaScript and encryption are not allowed. Colors are tied to an embedded ICC profile. The file renders the same way on any system, now and in 10 years.
That matters for invoices. Belgium requires you to keep invoices for 10 years, Germany for 8 years. Over that period the invoice must stay readable.
| Feature | Regular PDF | PDF/A |
|---|---|---|
| Fonts | Can reference system fonts | All fonts must be embedded |
| JavaScript | Allowed | Prohibited |
| External content | Allowed | Not allowed (fonts, images and streams must be inside the file) |
| Color | Device colors are fine | Embedded ICC output intent |
| File attachments | Any file | None in PDF/A-1, only PDF/A files in PDF/A-2, any file in PDF/A-3 |
| Encryption | Allowed | Prohibited |
| Metadata | Optional | XMP metadata with the PDF/A part and level |
PDF/A versions explained
There are four parts of PDF/A. Each part has conformance levels: b (basic, visual appearance), u (b plus Unicode text) and a (u plus tagged structure for accessibility). For invoices, level b is the usual choice.
| Version | Based on | Attachments | Invoice use |
|---|---|---|---|
| PDF/A-1 (ISO 19005-1:2005) | PDF 1.4 | None | Visual copy inside a UBL invoice |
| PDF/A-2 (ISO 19005-2:2011) | PDF 1.7 | Only other PDF/A files | Visual copy, adds transparency and JPEG 2000 |
| PDF/A-3 (ISO 19005-3:2012) | PDF 1.7 | Any file type | Required for Factur-X and ZUGFeRD |
| PDF/A-4 (ISO 19005-4:2020) | PDF 2.0 | Any file type in PDF/A-4f | Not used by Factur-X 1.09.2 or ZUGFeRD 2.5.2 |
Hybrid invoices: Factur-X and ZUGFeRD
A hybrid invoice puts both worlds in one file. The PDF/A-3 page is the invoice a person reads. The embedded XML is the same invoice for software. The current version is ZUGFeRD 2.5.2, identical to Factur-X 1.09.2, published on 4 August 2026. For profiles and the XML structure, see our ZUGFeRD format guide and Factur-X format guide.
A valid hybrid invoice needs four things:
- A PDF/A-3 file, usually PDF/A-3b.
- A CII XML attachment with a fixed name:
factur-x.xml(Factur-X and ZUGFeRD 2.1 or later),zugferd-invoice.xml(ZUGFeRD 2.0) orxrechnung.xml(the XRECHNUNG profile). - An associated file entry that links the XML to the document, with an AFRelationship value such as Alternative.
- XMP metadata that declares the Factur-X schema, the file name and the profile (for example EN 16931).
The PDF and the XML must show the same data. When they differ, the XML is the invoice. In Germany, the profiles MINIMUM and BASIC WL do not count as an e-invoice. You can open any hybrid file in the free ZUGFeRD validator or Factur-X validator. They check the embedded XML, the attachment entry, the XMP metadata and the PDF/A-3 basics. To pull the embedded XML out of a hybrid PDF yourself, use our ZUGFeRD and Factur-X XML extractor.
PDF/A-3 hybrid vs Peppol UBL: side by side
Both carry an EN 16931 invoice. The difference is the container and the delivery channel. A hybrid file travels as a PDF, mostly by email or upload. A Peppol invoice travels as XML through two certified Access Points.
| Aspect | PDF/A-3 hybrid (Factur-X, ZUGFeRD) | Peppol BIS 3.0 UBL |
|---|---|---|
| What is the invoice? | The embedded CII XML | The UBL XML |
| Readable copy | Built in (the PDF pages) | Optional PDF attachment, or rendered by the receiver |
| Delivery | Email, portal, upload | Peppol network (AS4, Access Points) |
| Receiver lookup | None, you need an email address | Peppol ID in the SMP directory |
| Validation | Factur-X XSD and schematron, PDF/A checks | UBL XSD, EN 16931 and Peppol schematron at the sending Access Point |
| Belgium (since 1 January 2026) | Only if both parties agree | Default format and channel |
| Germany | Accepted e-invoice (profile BASIC or higher) | Accepted e-invoice |
| France (reform since 1 September 2026) | One of the three base formats | UBL is a base format, via a PA |
If your customers are on Peppol, send UBL. If you already produce Factur-X or ZUGFeRD, the CII data maps to UBL. Our free Factur-X converter and ZUGFeRD converter turn CII into Peppol BIS 3.0 UBL. Our e-invoicing mandate matrix shows which format each country expects and from which date.
When does Peppol require PDF/A?
Never, as far as the specification goes. We checked Peppol BIS Billing 3.0 version 3.0.21 in November 2026. No rule mentions PDF/A. For an embedded PDF, the schematron checks three things:
- The
mimeCodeis on the allowed list. - The
filenameattribute is present. - The document reference has an ID.
Some receivers and archiving tools do ask for PDF/A. That is their own policy, not a Peppol rule. PDF/A is still the safe choice for the visual copy, because it stays readable for the whole retention period.
How to embed a PDF in a Peppol UBL invoice
A PDF goes into cac:AdditionalDocumentReference (business group BG-24, additional supporting documents). The file itself sits base64-encoded in cbc:EmbeddedDocumentBinaryObject (BT-125). Place the element after cbc:BuyerReference and the other document references, and before cac:AccountingSupplierParty. The UBL schema enforces that order.
<cbc:BuyerReference>PO-7781</cbc:BuyerReference>
<cac:AdditionalDocumentReference>
<cbc:ID>INV-2026-0142</cbc:ID>
<cbc:DocumentDescription>Invoice copy (PDF)</cbc:DocumentDescription>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject
mimeCode="application/pdf"
filename="INV-2026-0142.pdf">JVBERi0xLjcKJeLjz9MK...</cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
<cac:AccountingSupplierParty>
<!-- ... -->We ran a full Belgian invoice with this block through the Peppol validator on 18 November 2026: valid against the UBL 2.1 XSD, EN 16931 and Peppol BIS 3.0, with no warnings. The base64 is shortened here. In a real file it holds the whole PDF, on one line or wrapped.
The validation rules that apply
| Rule | Severity | What it checks |
|---|---|---|
| BR-52 | Fatal | Each additional supporting document has an ID (BT-122) |
| UBL-DT-07 | Fatal | The binary object has a filename attribute |
| BR-CL-24 | Fatal | The mimeCode is one of the six EN 16931 media types |
| PEPPOL-EN16931-CL001 | Fatal | Same check on the Peppol side: the mimeCode is in the IANA subset |
| UBL-SR-33 | Fatal | At most one DocumentDescription per document reference |
| DE-R-022 | Fatal (DE to DE only) | Unique file names when supplier and customer are both in Germany |
The UBL schema itself also requires the mimeCode attribute. A missing mimeCode fails as an XSD error before any schematron rule runs. For more error codes, see our guide to Peppol UBL errors.
Allowed mimeCodes
| File | mimeCode |
|---|---|
application/pdf | |
| PNG | image/png |
| JPEG | image/jpeg |
| CSV | text/csv |
| Excel (xlsx) | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| OpenDocument (ods) | application/vnd.oasis.opendocument.spreadsheet |
application/xml, application/zip and Word files fail validation. The Belgian FPS Finance FAQ notes that XML will be added in the revised EN 16931, and that parties can agree to use it today. The current Peppol schematron still rejects it, so a Peppol Access Point will not send such an invoice.
Can I embed a Factur-X PDF inside UBL?
Yes. A Factur-X file is a PDF, so application/pdf passes. The receiver still books the UBL and ignores the XML inside the PDF. Make sure both carry the same amounts. Two versions of one invoice with different data cause disputes.
Linking instead of embedding
For large supporting files, UBL allows an external link in cac:Attachment/cac:ExternalReference/cbc:URI (BT-124). Use an absolute URL that stays available for the full retention period. For an invoice copy, embedding is the better choice.
Attachment size limits on Peppol
Peppol BIS 3.0 sets no maximum size for attachments or invoices. The limits come from the transport and from the receiver:
- Base64 overhead: encoding adds about 33%. A 3 MB PDF becomes about 4 MB of XML.
- Receiver rejections: the Peppol Message Level Status specification lists "file size exceeds specifications" as a reason to reject a message.
- Business systems: ERP and accounting tools on the receiving side often cap attachments. Some platforms stop at 10 MB.
Practical rule: keep the invoice copy under 1 MB and the full message under a few megabytes. Compress scanned images. Do not embed the same PDF twice. Send large drawings or reports as an external link.
PDF attachments in Belgium: what the FPS Finance says
Since 1 January 2026, Belgian B2B invoices must be structured e-invoices, by default Peppol BIS 3.0 UBL. Many Belgian senders still embed a PDF copy out of habit. The official B2B FAQ sets the rules (checked November 2026):
- The UBL is the invoice. The structured electronic invoice is the only legally required invoice.
- A PDF is optional. A customer cannot reject an invoice because no PDF is attached, so it cannot be made mandatory.
- Same channel. Attachments that complete the invoice are part of the invoice. Send them inside the UBL or as an external link, never by separate email.
- Keep the structured invoice. The receiver keeps the UBL for the full retention period and must keep it readable, via a PDF or a viewer. A PDF used for that must not change the invoice content.
So a Belgian receiver who gets UBL without a PDF can render it themselves. Our free Peppol to PDF converter and Peppol invoice viewer do that in the browser.
How to fix "invoices must be in PDF/A format with embedded XML"
- Find out what the receiver expects. Ask whether they want a hybrid PDF by email or upload, or a Peppol invoice. If they have a Peppol ID, send UBL over Peppol and the error goes away.
- If they want a hybrid file, generate a real Factur-X or ZUGFeRD invoice: PDF/A-3b, the CII XML embedded as
factur-x.xml, and matching XMP metadata. Converting a PDF to PDF/A alone is not enough. - Validate before you send. Run the PDF through the ZUGFeRD validator and check PDF/A conformance with veraPDF.
- If you only have plain PDFs, convert them to UBL and send them over Peppol. You can do that yourself, or let us convert your PDF invoices to Peppol UBL. To see which fields of a PDF map to UBL first, run it through our PDF invoice to UBL field analyzer.
Embedding a PDF with the e-invoice.be API
With our API you do not write the XML by hand. Pass the PDF in the attachments array of POST /api/documents/. We write it into the UBL as an AdditionalDocumentReference with the right mimeCode and filename.
curl -X POST https://api.e-invoice.be/api/documents/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document_type": "INVOICE",
"invoice_id": "INV-2026-0142",
"invoice_date": "2026-11-18",
"due_date": "2026-12-18",
"vendor_name": "Supplier BV",
"vendor_tax_id": "BE0123456749",
"customer_name": "Customer NV",
"customer_tax_id": "BE0987654394",
"customer_peppol_id": "0208:0987654394",
"items": [
{
"description": "Consulting",
"quantity": 10,
"unit_price": 100.00,
"tax_rate": 21
}
],
"attachments": [
{
"file_name": "INV-2026-0142.pdf",
"file_type": "application/pdf",
"file_data": "JVBERi0xLjcKJeLjz9MK..."
}
]
}'Watch out: POST /api/documents/{document_id}/attachments stores a file next to the document but does not add it to the UBL. Use the attachments field on create if the receiver must get the PDF.
The same works from the TypeScript, Python, PHP, Ruby and Java/Kotlin SDKs, the CLI (brew install e-invoice-be/tap/peppol-cli) and our MCP server. See the Peppol API and the developer docs.
How to convert PDF to PDF/A
For a visual copy, any PDF passes Peppol validation. For archiving or a receiver that asks for PDF/A, convert first. Pick PDF/A-1b or PDF/A-2b for a plain copy and PDF/A-3b if you will add an XML later.
Ghostscript (free, command line)
The usual choice for automated workflows. Ghostscript needs an ICC profile for a conformant result. Pass it through a copy of its PDFA_def.ps file. Without it, veraPDF often reports a missing output intent.
gs -dPDFA=2 -dBATCH -dNOPAUSE -dNOOUTERSAVE \
-sColorConversionStrategy=RGB \
-sDEVICE=pdfwrite \
-dPDFACompatibilityPolicy=1 \
-sOutputFile=invoice-pdfa2.pdf \
PDFA_def.ps input.pdfLibreOffice (free, GUI or command line)
Exports to PDF/A from documents. SelectPdfVersion 1, 2 and 3 give PDF/A-1b, PDF/A-2b and PDF/A-3b.
libreoffice --headless --convert-to \
"pdf:writer_pdf_Export:{\"SelectPdfVersion\":{\"type\":\"long\",\"value\":\"2\"}}" \
invoice.docxAdobe Acrobat Pro (commercial)
Use Save as Other, then PDF/A, or the PDF Standards fixups in Preflight. Preflight also reports what blocks conformance.
None of these tools creates a hybrid invoice. For Factur-X or ZUGFeRD you also need to embed the CII XML and write the Factur-X XMP metadata. Libraries such as the open-source Mustangproject (Java) and factur-x (Python) do that step.
How to validate PDF/A compliance
Check the result with a validator, not by eye. A file can look fine and still fail on a missing font or color profile.
- veraPDF (free, open source): the reference PDF/A validator, backed by the PDF Association. Command line and GUI.
- Adobe Acrobat Preflight: built-in PDF/A checks and fixes.
- ZUGFeRD validator: for hybrid files. Checks the embedded XML against the Factur-X 1.09.2 schematron, plus the attachment entry and XMP metadata.
- Peppol validator: for the UBL that carries your PDF. Catches UBL-DT-07 and BR-CL-24.
# Validate as PDF/A-3b with veraPDF
verapdf --flavour 3b invoice-pdfa3.pdf
# A conformant file shows in the XML report:
# <validationReport ... isCompliant="true">Skip the format puzzle
Send the PDFs your billing tool already makes. We convert each one to a Peppol BIS 3.0 UBL invoice and deliver it, for 1 extra credit per PDF on top of the document. Pricing starts from €0.25 per document. No subscription, prepaid credits, pure pay per use. Account creation and your Peppol ID registration are free.
Frequently asked questions
Does Peppol require PDF/A?
No. Peppol BIS Billing 3.0 (version 3.0.21) has no PDF/A rule. The invoice itself is the UBL XML. A PDF attachment is optional and the schematron only checks the mimeCode (application/pdf) and the filename. PDF/A is still a good choice for the visual copy, because it stays readable for the whole retention period.
Can I send a Factur-X or ZUGFeRD PDF over Peppol?
Not as the invoice. Peppol carries an XML business document, in practice a Peppol BIS 3.0 UBL invoice. You can embed the Factur-X PDF inside the UBL as an attachment with mimeCode application/pdf, but the receiver processes the UBL and ignores the XML inside the PDF. To move from Factur-X to Peppol, convert the CII data to UBL.
Which attachment types does Peppol BIS 3.0 accept?
Six MIME codes: application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx) and application/vnd.oasis.opendocument.spreadsheet (ods). Any other value fails BR-CL-24 and PEPPOL-EN16931-CL001. XML attachments are not on the list yet.
What is the maximum attachment size on Peppol?
Peppol BIS 3.0 sets no size limit. Limits come from Access Points and receiving systems, and the Peppol MLS specification lists "file size exceeds specifications" as a rejection reason. Base64 adds about 33% to the file size. Keep the full message to a few megabytes, and use an external link for large files.
Is the PDF attachment legally binding in Belgium?
No. The Belgian FPS Finance FAQ says the structured electronic invoice is the only legally required invoice. A PDF attachment is not mandatory and a customer cannot reject an invoice because it has none. Supporting documents that complete the invoice must travel in the same channel, inside the UBL or as an external link.
Which PDF/A version do I need?
For a hybrid invoice (Factur-X or ZUGFeRD), PDF/A-3, usually PDF/A-3b, because only PDF/A-3 allows an XML attachment. For a visual copy inside a Peppol UBL invoice, any PDF passes validation. PDF/A-1b, PDF/A-2b or PDF/A-3b are all good archive choices.
What does the error UBL-DT-07 mean?
UBL-DT-07 says "Binary object elements shall contain the file name attribute". Your cbc:EmbeddedDocumentBinaryObject has a mimeCode but no filename. Add filename="invoice-123.pdf" to the element and validate again.
How do I fix 'invoices must be in PDF/A format with embedded XML'?
This message does not come from Peppol. It comes from a receiver or portal that expects a hybrid invoice, such as a ZUGFeRD or Factur-X workflow. Either send a real PDF/A-3 file with factur-x.xml embedded, or, if the receiver is on Peppol, send a Peppol BIS 3.0 UBL invoice instead. Check which channel the receiver actually uses.
How do I convert a regular PDF to PDF/A?
Use Ghostscript with -dPDFA and an ICC profile, LibreOffice export (SelectPdfVersion 1, 2 or 3), or Adobe Acrobat. Then check the result with veraPDF. Converting to PDF/A does not create a hybrid invoice. For Factur-X you also need the embedded XML and the XMP metadata.

Tom Van Asbroeck
Co-founder, Peppol & tax expert
Tom is a co-founder of e-invoice.be and runs its operations. He helps companies and software vendors connect to Peppol and answers their questions on e-invoicing rules and VAT.
- Co-founder of e-invoice.be, a certified Peppol Access Point
- Hosts the 15-minute Peppol discovery calls
- Follows the e-invoicing mandates in Belgium, France and Germany
Stuck between PDF/A, Factur-X and Peppol UBL? Talk it through with someone who's shipped all three.
Bring a sample file. We tell you which format your receiver expects, what fails validation and what to fix.
Vendor-neutral. No obligation to switch platforms.

Hosted by Tom Van Asbroeck
Peppol & tax expert