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 en foutuitlegger
Vind ontbrekende velden, structurele problemen en Peppol-issues, en lees uitleg in gewone taal.
UBL Viewer
Toon een UBL XML-factuur als een leesbaar factuuroverzicht.
UBL-totalen checker
Verifieer regel-, btw- en betaaltotalen tegen LegalMonetaryTotal.
UBL btw-checker
Vergelijk aangegeven en berekende btw per categorie.
UBL-veldenuitlegger
Zoek UBL-velden en lees wat elk XML-pad betekent.
Peppol BIS Billing-checker
Controleer veelvoorkomende Peppol BIS Billing 3.0-factuurproblemen.
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.