Mustang was originally implemented in Java but since April 2022 there is also a version in .net. It is open source, AGPL-licensed and part of the Mustang subscription.

It will not support ZUGFeRD version 1 and no validation, and for the time being it does not yet support Order-X, Allowances/Charges, Embedded files, corrected invoices, credit notes or references e.g. to shippings, contracts or other documents. But we need your feedback what you require.

And it does support XRechnung, ZUGFeRD 2 and Factur-X and arbitrary PDF input, so you can even use it if you don’t even have a PDF/A-document.

The conversion from PDF into PDF/A-3 can also be used separately.

Internally, the PDF/A-3-functionality is based on Ghostscript, for a commercial use a commercial Ghostscript-license may be required. can be used quite similar to Mustang+Java:

using org.mustangproject;
using System.IO;
using java.math;
Invoice i = (new Invoice()).setDueDate(DateTime.Now).setIssueDate(DateTime.Now).setDeliveryDate(DateTime.Now).setSender((new TradeParty("Test company","teststr","55232","teststadt","DE")).addTaxID("DE4711").addVATID("DE0815").setContact(new Contact("Hans Test","+49123456789","")).addBankDetails(new BankDetails("DE12500105170648489890","COBADEFXXX"))).setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE")).setReferenceNumber("991-01484-64").setNumber("123").
		addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), new BigDecimal("1.0"), new BigDecimal("1.0")));

ZUGFeRD2PullProvider zf2p = new ZUGFeRD2PullProvider();
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();

string outfilename="xrechnung.xml";
File.WriteAllBytes(outfilename, zf2p.getXML());

Just replace Date by System.DateTime, and the ZUGFeRDExporterFromPDFA1 requires a String constructor argument, the path to your Ghostscript native .dll file.

With the above invoice object of course you can also write a Factur-X/ZUGFeRD PDF file using

ZUGFeRDExporter ex=new ZUGFeRDExporter("gsdll64.dll").load("blanko.pdf");

For a test you can use our MustangBlanko PDF-A/1 file but in the source can also be a plain pdf file.

To confirm the XML amounts match your amounts, you can e.g. use

TransactionCalculator tc=new TransactionCalculator(i);

For arbitrary precision, “java.math”‘s BigDecimal, i.e. the OpenJDK.BigMathNET package is used. In the .csproj the following itemgroup entries make sense:

    <PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
    <PackageReference Include="itext7" Version="7.2.1" />    
    <PackageReference Include="OpenJDK.BigMathNET" Version="" />
    <PackageReference Include="Ghostscript.NET" Version="1.2.3" />
    <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.4" />

    <Reference Include="mustang">

However, sign up for the free beta and more news here:

We will use your e-mail-address to send you download links and notification about
new releases and the beta status of using our service provider “Sendinblue”.
Even during peak times, this amounts to only around one e-mail per week.
This subscription (and the participation in the beta until it ends) is free of charge,
you will receive a initial email to confirm your e-mail-address and of course you can
cancel this subscription and with it, your participation in the beta, at any time.