PDF invoice metadata

The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs

Get the docs »

About

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 ZUGFeRD standard 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.

License

The files are subject to the Apache license and can therefore be used for free in commercial and noncommercial projects.

Projects using it

Using it

Implementing

Alternatives

Apart from the

Please let me know via the mailing list if I'm missing something or I am in error.

Implementing

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.

Screenshot of Acrobat Adobe PDF Reader showing a ZUGFeRD invoice with open file attachments tab 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

Internal architecture

  1. 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 required 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 sample. Just make sure the input PDF file is valid PDF/A-1, e.g. using the 3-Heights™ PDF Validator Online Tool.
  2. The three conformance levels of PDF, PDF/A-3a, A-3u and A-3b, more or less refer to completely compliant documents, documents 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 e.g. blind users.
  3. Then we embed a XML file, conforming to the according schema delivered with ZUGFeRD.
  4. 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 extensions.

Contact

Mailing list and credits

At https://groups.google.com/forum/?hl=de#!forum/zugferd

Credits

Imprint

For multiplier inquiries or legal issues please contact Jochen Stärk at jstaerk [at] usegroup.de or postal:

usegroup c/o Jochen Stärk
Poststr. 2-4
60329 Frankfurt
Germany