Free and open source tool chain for generating EN16931 conforming e-invoices (Factur-X/ZUGFeRD, UBL, CII, XRechnung) from popular spreadsheet formats or JSON.
- Supported Formats
- Using the software
- Description
- Documentation
- Alternatives
- BUGS
- Reporting Bugs
- Copyright
- Disclaimer
You can currently create e-invoices in these formats:
CII
: customization idurn:cen.eu:en16931:2017
Factur-X-Minimum
customization idurn:factur-x.eu:1p0:minimum
Factur-X-BasicWL
customization idurn:factur-x.eu:1p0:basicwl
Factur-X-Basic-WL
is an alias forFactur-X-BasicWL
Factur-X-Basic
customization id'urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic'
Factur-X-EN16931
customization idurn:cen.eu:en16931:2017
Factur-X-Comfort
is an alias forFactur-X-EN16931
Factur-X-Extended
customization idurn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended
Factur-X-XRechung
customization idurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
UBL
: customization customization idurn:cen.eu:en16931:2017
XRECHNUNG-CII
: customization idurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
XRECHNUNG-UBL
: customization idurn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0
ZUGFeRD-Minimum
is an alias forFactur-X-Minimum
ZUGFeRD-BasicWL
is an alias forFactur-X-BasicWL
ZUGFeRD-Basic-WL
is an alias forFactur-X-BasicWL
ZUGFeRD-Basic
is an alias forFactur-X-Basic
ZUGFeRD-EN16931
is an alias forFactur-X-EN16931
ZUGFeRD-Comfort
is an alias forFactur-X-EN16931
ZUGFeRD-Extended
is an alias forFactur-X-Extended
ZUGFeRD-XRechung
is an alias forFactur-X-XRechnung
Case does not matter, when you specify a format.
There are several ways to use the software:
The JavaScript/TypeScript library works both on the commandline and in the browser. The only limitation of the browser version is that it cannot generate PDF versions of invoices from spreadsheet data because this requires invocation of LibreOffice which is not possible in the browser. Instead, you have to provide a PDF version yourself, in case it is needed.
The E-Invoice-EU documentation contains a fully working demo of invoice generation right in your browser.
This repository is an attempt to aid businesses, especially in France and Germany but also in other parts of the European Union to create e-invoices conforming with EN16931 with only free and open-source software.
See the E-Invoice-EU online documentation.
The blog post Creating E-Invoices with Free and Open Source Software or the German version Elektronische Rechnungen mit freier und quelloffener Software erzeugen also provides in-depth information using a gentler approach!
You can achieve similar results with these projects:
- Factur-X extension for LibreOffice is a LibreOffice extension to generate Factur-X invoices from LibreOffice Calc published under the GPL licence with a video tutorial. It is maybe less flexible but easier to set up.
The Factur-X resp. ZUGFeRD standard requires PDF/A compliance for the PDF that the invoice is wrapped in. Please search the internet if you do not know what PDF/A means.
This library creates PDFs solely with pdf-lib
and does some pretty complicated transformations on the PDF to achieve PDF/A
compliance. This is not battle tested and may fail.
If you encounter a PDF that does not meet the PDF/A requirements, please open an issue and attach an anonymized version of the PDF. What you can do in the meantime:
- If you have GhostScript installed, convert the PDF to PDF/A with this command:
gs -dVERBOSE -dPDFA=3 -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=OUTPUT_FILE.pdf PDFA_def.ps INPUT_FILE.pdf
- Try to create the PDF again with LibreOffice.
- If the normal settings in LibreOffice do not work, enable PDF/A support (in the General section of the PDF options).
- If you want to automate the process, you can start LibreOffice in headless mode on the commandline:
libreoffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to 'pdf:writer_pdf_Export:{"SelectPdfVersion":{"type":"long","value":"3"}}' SOURCE_FILE.ods
On Un*x systems, libreoffice
should be in your $PATH
. On MacOS, you will
find it under /Applications/LibreOffice.app/Contents/MacOS/soffice
. On
MS Windows, it is probably somewhere like C:\\Program Files\\LibreOffice\\libreoffice.exe
(corrections are welcome).
Please report bugs at https://github.com/gflohr/e-invoice-eu/issues.
Copyright (C) 2024-2025 Guido Flohr guido.flohr@cantanea.com, all rights reserved.
This is free software available under the terms of the WTFPL.
This free software has been written with the greatest possible care, but like all software it may contain errors. Use at your own risk! There is no warranty and no liability.