There is another Mustang project on car parts and one on youth and horses.
This Mustang project is a Java im- and exporter library for the ZUGFeRD standard.
ZUGFeRD is a electronic invoice meta data standard, see ferd-net.
More precisely, this library is using Apache PDFBox to support the
"Comfort" scheme of version 1 of
the ZUGFeRD standard. It was developed in the context of usegroup's Gnuaccounting open source accounting application.
The name refers to Mustangs, which are often considered as wild and free horses. The german name of the
resembles a Zugpferd, a drafting horse. This is why the Mustang as a free horse gave the free ZUGFeRD
implementation it's name.
Mustangproject 1.3.0 for ZUGFeRD 1.0 released on 2016-03-11.
The files are subject to the Apache license and
can therefore be used for free in commercial and noncommercial projects.
Projects using it
Apart from the
Please let me know via the mailing
I'm missing something or I am in error.
The source code is hosted on GitHub.
Both the english
and the german
documentation on importing and exporting ZUGFeRD data with the Mustangproject, including samples, are
available in the GitHub repository.
At the right you see a sample PDF containing
ZUGFeRD metadata generated with the Mustang library. If you open it in Adobe Acrobat Reader just
click on the paperclip symbol to see the embedded ZUGFeRD XML structure.
Unless you used a corrupted input PDF, the created PDF/A-3 always validates against
3-Heights™ PDF Validator Online
Tool. If you embed custom ZUGFeRD XML please make sure that your ZUGFeRD file additionally validates against
We base on a PDF/A-1a file as input with the human readable representation of the invoice.
PDF/A is a substandard of PDF to allow long term archival of the files which are, unlike PDF, therefore
to include and not to link to external resources like fonts.
This base file can be generated using e.g. Apache OpenOffice.org (using UNO or e.g.
NOA-libre) or directly using PDFBox as in this
Just make sure the input PDF file is valid PDF/A-1, e.g. using the 3-Heights™ PDF Validator Online
The three conformance levels of PDF, PDF/A-3a, A-3u and A-3b, more or less refer to completely compliant
which at least preserve unicode and documents which preserve at least the optical representation.
We use Apache PDFBox to change the input PDF/A-1a file to a PDF/A-3u file. If it were tagged PDF we
could even export to PDF/A-3a but
usually we can not guarantee that the source file is completely tagged, i.e. semantically useful for
Then we embed a XML file, conforming to the according schema
delivered with ZUGFeRD.
And add information in the RDF-metadata part of the PDF document, indicating that the embedded
ZUGFeRD-invoice.xml is indeed a ZUGFeRD invoice. This also requires us to add according PDF/A schema
Mailing list and credits
- Thomas Chojecki: One of the Apache PDFBox maintainer who was the first one to teach Jochen how to
generate PDF/A-3a compliant file attachments
- Alexander Schmidt: JAXB contribution
- Jochen Stärk: developer/maintainer
For multiplier inquiries or legal issues please contact Jochen Stärk at jstaerk [at] usegroup.de
usegroup c/o Jochen Stärk