Thursday, March 13, 2025

PDF Container in XRechnung

 In XRechnung, a PDF container refers to a PDF document that contains an embedded machine-readable invoice in XML format, typically conforming to the XRechnung standard. This approach allows for a human-readable representation (PDF) and a machine-processable version (XML) of the invoice to be delivered together in a single file.

Breakdown:

  • XRechnung is a German standard for electronic invoicing that is compliant with the European Norm EN 16931.

  • The core requirement is to send an XML invoice that conforms to this standard.

  • Some recipients, however, still prefer to view the invoice in a readable format — that's where the PDF container comes in.

The PDF container includes:

  1. A visual representation of the invoice (PDF).

  2. An embedded XRechnung XML file as an attachment inside the PDF/A-3 format (an ISO standard for archivable PDFs that allows file attachments).

Why use it?

  • Helps bridge the gap between systems that can process XML and users who want to visually inspect the invoice.

  • Common in B2G (Business to Government) settings where PDF readability is often still required.

Tools often used:

  • PDF/A-3 compliant tools like iText, Apache PDFBox, or commercial invoice generation software.

  • Embedded XML file is typically added as a file attachment with a specific MIME type and naming convention (zugferd-invoice.xml or similar).

Let me know if you’d like a sample structure or to generate one for testing.

No comments: