Check embedded PDF attachments in UBL invoices
Paste your UBL XML to inspect AdditionalDocumentReference attachments. We decode base64 locally, check for the %PDF- header, and explain common problems.
Paste or load UBL XML
About embedded PDFs in UBL
- EmbeddedDocumentBinaryObject carries an attached file inline in the XML.
- Base64 converts a binary PDF into safe ASCII characters that fit inside XML.
- UBL invoices commonly include a human-readable PDF next to the structured XML.
- The XML is for software; the PDF is for people. Both should describe the same invoice.
Tools
UBL-Validator und Fehler-ErklÀrer
Finden Sie fehlende Felder, strukturelle Probleme und Peppol-Probleme und lesen Sie ErklÀrungen in einfacher Sprache.
UBL-Anzeige
Stellt eine UBL-XML-Rechnung als lesbare RechnungsĂŒbersicht dar.
UBL-SummenprĂŒfer
Vergleicht Zeilen-, Steuer- und Zahlungssummen mit LegalMonetaryTotal.
UBL-USt.-PrĂŒfer
Vergleicht angegebene und berechnete USt. pro Kategorie.
UBL-Feld-ErklÀrer
Durchsuchen Sie UBL-Felder und lesen Sie, was jeder XML-Pfad bedeutet.
Peppol-BIS-Billing-PrĂŒfer
PrĂŒft hĂ€ufige Probleme von Peppol-BIS-Billing-3.0-Rechnungen.
Frequently asked questions
âșWhat is EmbeddedDocumentBinaryObject?
It is the UBL element used to carry an embedded file (typically a PDF) inside the invoice XML. The file content is encoded as a base64 string and accompanied by mimeCode and filename attributes.
âșWhat is Base64?
Base64 is a way to represent binary data (like a PDF) using only printable ASCII characters. It makes it safe to embed binary files inside XML.
âșWhy include a PDF in a UBL invoice?
The XML is for automated processing; a human-readable PDF helps people read the invoice. Many regulations (and Peppol practice) recommend including a visual PDF alongside the structured data.
âșStructured XML versus PDF â what's the difference?
The structured XML is what software reads to book the invoice automatically. The PDF is what humans look at. Both should describe the same invoice.
What this tool does
The embedded PDF checker inspects the UBL EmbeddedDocumentBinaryObject element and confirms whether the attached PDF is structurally valid, has the correct MIME type and decodes from Base64 without errors.
Common UBL and Peppol problems it detects
- EmbeddedDocumentBinaryObject containing non-PDF content disguised with mimeCode=application/pdf.
- Invalid or truncated Base64 payloads.
- Missing mimeCode or filename attributes.
- Attachments far above the recommended Peppol size limit.
Why this matters
Many buyers archive the embedded PDF as the visual original of the invoice. A broken attachment can fail audits and block payment workflows that depend on the PDF being viewable.
Example: %PDF header missing
If the decoded Base64 does not start with the bytes %PDF-, the attachment is not a PDF â typically caused by accidentally Base64-encoding an HTML or XML preview instead of the real PDF.
How to fix the issue
- Re-export the PDF from your invoicing system and re-encode with standard Base64.
- Set mimeCode="application/pdf" and provide a filename ending in .pdf.
- Keep attachments under a few megabytes to stay within Peppol limits.
- Re-run the checker to confirm the PDF decodes and starts with %PDF-.
Frequently asked questions
âșWhere in the UBL is the embedded PDF?
It lives at /Invoice/cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject as a Base64-encoded string with a mimeCode attribute.
âșIs the PDF uploaded anywhere?
No. The checker decodes the Base64 in your browser and never sends the PDF anywhere.