The ZUGFeRD library allows to create XML files as required by German electronic invoice initiative ZUGFeRD as well invoices in the successor Factur-X. One special profile of Factur-X is the German XRechnung format. The library is meant to be as simple as possible, however it is not straight forward to use as the resulting XML file contains a complete invoice in XML format. Please take a look at the ZUGFeRD-Test project to find sample creation code. This code creates the same XML file as shipped with the ZUGFeRD information package.
Subject to the Apache license https://www.apache.org/licenses/LICENSE-2.0.html
Tests and writing support for ZUGFeRD invoices are still missing.
More examples will come soon.
You can use the PDFtk Server tool to extract the xml attachment from a pdf file. The tool is available at https://www.pdflabs.com/tools/pdftk-server/
A wrapper for the tool is available at unit intf.ZUGFeRDHelper.pas
var pdfAsStream : TStream;
var cmdOutput : String;
if GetZUGFeRDPdfHelper.SetPdfTkServerPath('C:\Program Files (x86)\PDFtk Server')
.PdfTkServerGetZUGFeRDPdfAttachment('zugferd.pdf',
pdfAsStream,
cmdOutput) then
try
System.Write(cmdOutput);
finally
pdfAsStream.Free;
end;
You can find more information about ZUGFeRD here: http://www.ferd-net.de/
https://www.ferd-net.de/standards/zugferd-2.2/zugferd-2.2.html
https://ecosio.com/de/peppol-und-xml-dokumente-online-validieren/
https://invoice-portal.de/xrechnung-peppol-bis-zugferd-validator/
https://www.zugferd-community.net/de/open_community/validation