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.
Narzędzia
Walidator UBL i objaśniacz błędów
Znajdź brakujące pola, problemy strukturalne i Peppol z wyjaśnieniami prostym językiem.
Podgląd UBL
Renderuje fakturę UBL XML jako czytelne podsumowanie.
Kontrola sum UBL
Weryfikuje sumy linii, podatków i do zapłaty względem LegalMonetaryTotal.
Kontrola VAT UBL
Porównuje deklarowany i obliczony VAT według kategorii.
Objaśniacz pól UBL
Wyszukaj pola UBL i przeczytaj, co oznacza każda ścieżka XML.
Kontrola Peppol BIS Billing
Wykrywa typowe problemy faktur Peppol BIS Billing 3.0.
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.