Implementing new EU invoice format (which is required for B2B from 2025)
From 2025, all B2B invoices within European Union must be machine readable by complying to a XML-spec (Factur-X).
In this post, I use secretariat
Gem for generating + validating the XML and then use plain Ghostscript to put it together with the original invoice.pdf into a hybrid so-called ZUGFeRD file that complies with the spec but still displays as a normal PDF(/A3).
Comments
If you create the invoice.pdf yourself, you could use HexaPDF to do everything at once: Create the PDF as PDF/A-3b (see e.g. https://hexapdf.gettalong.org/examples/pdfa.html) and embed the XML file. Then no external tools would be needed.
Post a comment