The German Electronic Invoicing Forum (FeRD) has set itself the task of preparing and coordinating electronic invoices from a technical, economic and legal perspective. A standardised format for electronic invoice exchange was created under the name ZUGFeRD.
ZUGFeRD stands for “Zentraler User Guide des Forum elektronische Rechnung Deutschland” and, according to FeRD, is suitable for all business sectors and public administration. The format is based on global standards and European recommendations and is intended to supplement the existing EDI standards nationwide in future and enable the conversion of previous paper-based processes. This is an ambitious goal, as around 30 million invoices are still sent by post every year in Europe.
The format from a technical viewpoint
Technically speaking, the ZUGFeRD format is a PDF/A3-compliant document to which a standardized invoice in XML format is attached. The rule of one PDF = one invoice applies. The PDF document presents the visual representation of the invoice (like the paper form)- The XML document contains the machine-readable representation of the invoice. Although the PDF can have several attachment files, the invoice attachment must be ZUGFeRD-invoice.xml. The structure of the XML file is based on the rules of the Cross Industry Invoice (CII) standard developed by UN/CEFACT.
When designing the format, it was taken into account that it can be used universally and for a wide range of different business areas. The format therefore defines three different profiles – which determine the scope of the XML document depending on the type of company:
- BASICThis profile reduces the requirements for the transmission of
structured data in order to be able to map the simplest invoices.
to map the simplest invoices. It is sufficient for automatic electronic archiving
, as well as for most applications of automated document
document distribution (workflow). Automated invoice verification is not always
possible because, depending on the business case, not all the
necessary information is transmitted in computer-readable form.
- COMFORTIn this profile, it is possible to transmit all data in a structured
form is possible, which for the majority of invoices sent enables
automated, system-supported invoice processing on the recipient side.
processing on the recipient side.
- EXTENDEDIn this profile, all data mapped in the ZUGFeRD data model is mapped in
structured form or as a qualified text field. The
selection of the data fields actually used depends on the
business process. The profile therefore covers the cross-industry
requirements for structured invoice data exchange as completely as possible
The Onlineportal von FeRD provides detailed information for anyone who would like to learn more about the ZUGFeRD format. An info package is also available for download there, which contains sample files and very detailed documentation. For the validation of ZUGFeRD documents, the website eInvoice Validation.Portal should be mentioned here. After a one-off, free registration, PDF documents can be uploaded and validated.
Use with conzept 16
To ensure that ZUGFeRD-compliant PDF documents can also be created in conzept 16, we have extended the PDF API for the upcoming conzept 16 release. The following function CreateZUGFeRDInvoicePDF converts an existing document into a ZUGFeRD-compliant PDF.
var aFileName : alpha; // Output PDF.
var aInvoiceXML : alpha; // XML file ZUGFeRD-invoice.xml.
var aOutFileName : alpha; // Name for the ZUGFeRD document.
aDescription : alpha; // Description of the attached invoice.
aCompress : logic; // Compress attachment y/n.
tPdf : handle;
tResult : int;
tPdf # PdfOpen(aFileName,_PdfOpenDefault,'',_PdfImportAll);
if (tPdf > 0)
tResult # tPdf->PdfAttachFile(aInvoiceXML,
if (tResult = _ErrOK)
tResult # tPdf->PdfClose(aOutFileName,_PdfModePdfZUGFeRDBasic);
tResult # tPdf;
The function accepts an existing PDF document and the XML document with the invoice data in the arguments aFileName and aInvoiceXML. It creates the ZUGFeRD PDF (aOutFileName) from this.
The code opens the source PDF with function
PdfOpen(). The XML document is then embedded in the PDF with the new command
PdfAttachFile(). The specification of
_PdfAttachAssociateZUGFeRD is important here. Each attachment of a ZUGFeRD PDF must be inserted with this option.
The command can be given an optional description of the attachment and whether it should be compressed. Compression is not always recommended. Text documents can be compressed well, whereas already compressed files, such as ZIPs, tend to become larger when compressed.
ZFinally, the ZUGFeRD PDF is generated with
PdfClose(). The invoice profile to be generated is also transferred here. In this case, a basic profile is generated.
Erstellen PDF A konformer Dokumente
PDF Verarbeitung in conzept 16