Skip to content

Factur-X / ZUGFeRD / PDF/A3b support

What is new - 24.0

DataFlex Reports v24.0 supports creating PDF files with Factur-X (a.k.a ZUGFeRD) or PDF/A 3b support.

Factur-X / ZUGFeRD is a cross-industry data format for electronic invoice data exchange that was developed by the Forum for Electronic Invoicing Germany (FeRD) - with support from the Federal Ministry of Economics and Energy. The ZUGFeRD data format is based on the Directive 2014/55/EU of 16 April 2014 on electronic invoicing for public contracts and on the EN16931 standard published on 28 June 2017. Additionally, the Cross-Industry Invoice (CII) of UN/CEFACT and the ISO standard 19005-3:2012 (PDF/A-3) are also taken into account as of ZUGFeRD 2.0. The areas of application for this hybrid invoice format are diverse, and ZUGFeRD can be used in B2B, B2G, and B2C business transactions.

ZUGFeRD 2.0 was developed in close coordination with the French standard Factur-X 1.0, is technically identical to it, and thus also pursues the standardization objectives at the European level. The hybrid invoice format contains the structured invoice data in a PDF/A-3 file that forms the view component of the invoice. The structured invoice data can be read out and processed by the invoice recipient.

ZUGFeRD 2.0 meets the requirements of the EU Directive and the EU standard.

The developer needs to provide an XML file following the structure outlined by the organization. How to structure the XML document is outside the scope of DataFlex Reports and can be found at the FeRD website. In the PDF document, the file is indicated as factur-x.xml.

To use ZUGFeRD in a report, set the iPDFType member of the PDFExport structure to C_drFacturX and pass the filename including path in the sFileName member. The filename can be anything and is expected to be in the correct format.

Example usage

Object oReport Is a cDRReport
    Set psReportName to "FacturX Test.dr"
End_Object

Procedure oExportButton is a Button
    Set Label To "Export"

    Procedure OnClick
        String sReportId
        drPDFExportOptions PDFExportOptions

        Get OpenReport Of oReport to sReportId
        If (sReportId <> "") Begin
            // Set export options 
            Get DefaultPDFExportOptions to PDFExportOptions
            Move C_drFacturX to PDFExportOptions.iPDFType
            Move "c:\test\my-invoice.xml" to PDFExportOptions.sFileName

            Set pPDFExportOptions of oReport to PDFExportOptions

            Send ExportReport of oReport C_drPDF "c:\test\mypdf.pdf"
            Send CloseReport of oReport sReportId
        End
    End_Procedure 
End_Object