Open-Source Libraries and Tools
Inofficial page on free Factur-X, Order-X and Deliver-X (and XRechnung) libraries and tools.
ZUGFeRD/Factur-X is a standard to embed machine readable XML in electronic invoice PDFs.
Libraries
Python
-
Akretion’s factur-x is a BSD-licensed library.
-
Raphael Michel created a APL library for python.
-
Early dev of FX parsing and generation library https://github.com/zfutura/pycheval
-
Fintom8 Document Anonymizer: automated PII and Sensitive Data Masking for pdf invoices & e-invoices.
PHP
-
@gp has a factur-x library for PHP
-
horstoeko has MIT licensed PHP projects for ZUGFeRD, Order-X and e.g. a Visualizer
-
dealerweb/einvoice MIT licensed PHP library (pure PHP, no Java) to read, validate, visualize and create XRechnung, ZUGFeRD/Factur-X and Peppol BIS invoices in UBL and CII. Validates with the XML schemas and the Schematron rules of EN 16931, XRechnung and ZUGFeRD/Factur-X, and with the Peppol BIS 3.0 rules in an own implementation; reads the XML out of a ZUGFeRD/Factur-X PDF and writes the PDF/A-3 with the XML embedded.
C++
-
Ghostscript, in it’s core a C++ library, can be used in a way that it actually produced proper PDF/A-3 Factur-X
.net/ C#
-
ZUGFeRD-csharp, library for .net/C#
Java
-
Konik GPL Java and C# library for ZUGFeRD 1
-
invoice4j is a modern permissive library for Java
-
Mustang is a old fashioned Java library and command line tool to extract, combine and validate and convert. It’s open-source REST API has been continued commercially.
-
Writing XRechnung in Java https://github.com/codebarista-de/gallop
Typescript
-
E-invoice EU Typescript and CLI
-
@attestwire/en16931 TypeScript library (MIT, zero dependencies) to validate and generate EN 16931 XML: XRechnung in UBL and CII, Peppol BIS 3, and the Factur-X/ZUGFeRD CII payload. Reads the XML out of a Factur-X PDF; does not write the PDF.
Ruby
-
Secretariat Library to generate ZUGFeRD XML in Ruby.
PDF tools
Creation
-
Ghostscript can also be used to create PDF/A files from ordinary PDF
-
COS-Viewer: iText RUPS can be used, along with a good hex editor to inspect the PDF internal structure, a generic GUI+CLI solution or a Windows-only alternative
-
MuPDF for windows and linux, mutools show can display simple internal structures
-
loca Open source AI/invoice recognition and ZUGFeRD/FX review+generation https://github.com/kyr0/easy-erechnung/
-
Open source AI/invoice recognition InvoiceNet
-
Open source OCR/pattern based invoice recognition invoice2data
Validators
-
FNFE uses a odoo plugin which is based on VeraPDF and the CEN Schematron
-
The ZUGFeRD-community online validation is based on Mustang and embeds VeraPDF and the CEN Schematron as well
-
Philip Helgers open-sourve-validator Phive can validate almost any invoice XML, including XRechnung, unfortunately not covering PDF-hybrid formats. Plus he has published the Kaltblut Factur-X/ZUGFeRD Validator
-
The DealerWeb online validator (German, free) for XRechnung, ZUGFeRD/Factur-X and Peppol BIS is based on dealerweb/einvoice; it shows a readable view of the invoice and does not store the file. For a PDF it checks the embedded XML, not the PDF itself.
-
VeraPDF, validates PDF-A,
-
Exiftool allows to quickly check PDF/A meta data,
Official Sources
-
The ZUGFeRD Infopaket includes schema and schematron, example files, specs, codelist and a refererence (called technical appendix)
-
The CEN Schematron can be used to validate ZUGFeRD/Factur-X XML
Other tools
ZUGFeRD/Factur-X Creating
-
The open source accounting application Fakturama
-
Mustang based
-
Andreas Rudolphs ZUGFeRD-Manager and
-
Robert Grosskopfs LibreOffice Base XRechnung
-
-
Factur-X extension for LibreOffice is a LibreOffice extension to generate Factur-X invoices from LibreOffice Calc published under the GPL licence (video tutorial)
-
The Gate (g8) is a factur-x producing android app https://github.com/gatesuperapp/g8-invoicing
ZUGFeRD/Factur-X Consuming
-
Open-source homebanking application: Hibiscus
Display
-
The XRechnung XSLT can be used to convert ZUGFeRD/Factur-X to HTML
-
Ultramarin Viewer is a freeware viewer for XRechnung based on these XSLTs, additionally
-
OpenXRechnungToolbox is an open source cross platform XRechnung viewer as well as
-
Quba-Viewer, a open source cross platform multi format viewer (also displaying ZUGFeRD/Factur-X PDF and XML)
Redaction
-
Andreas Starkes original little python utility to remove personal data/anonymize invoices
-
Valitool’s https://github.com/valitoolorg/zebra and it’s online version http://zebra.valitool.org/
-
Philip Helgers XSLT based https://github.com/phax/ph-redact
Miscellaneous
-
Additional data is a python project to support extensions for certain industries like logistics, adding additional information to structured invoices
-
Swiss army knife conversion tool, use e.g. it’s commandline tool EIGOR to convert interchangably between CII, UBL and FatturaPA
-
Philip Helger published a java library to convert UN/CEFACT CII to UBL
-
Auratech published a tool cii to ubl and vice versa https://github.com/Auratechcom/converter_ubl_cii_invoice_xml
-
There is a OpenXRechnungToolbox to visualize and validate XRechnung and Leitweg-IDs
-
There is an interesting parser for the EN16931 specification documents
-
And there is a MIT licensed parser for the Factur-X/ZUGFeRD Spec https://github.com/S2-Industries/FactoorSharp.FacturXDocumentationParser publishing to http://doc.factoorsharp.com/
-
xpdf has a interesting pdfdetach command line tool to extract the XML from the PDF
-
There is a corpus of samples, with german B2B samples in the XML-Rechnung subdirectory