ZUGFeRD embeds a structured XML invoice inside a PDF/A file, producing a document that is both human-readable and machine-processable.

Export with ZUGFeRD settings. Render the invoice, then export to PDF supplying the XML payload and compliance level:
var report = StiReport.CreateNewReport();
report.Load("Reports\\Invoice.mrt");
report.Render();

byte[] xmlBuf = File.ReadAllBytes("Reports\\ZUGFeRD-sample.xml");

var settings = new StiPdfExportSettings
{
    ZUGFeRDComplianceMode  = StiPdfZUGFeRDComplianceMode.V2_1,
    ZUGFeRDInvoiceData     = xmlBuf,
    ZUGFeRDConformanceLevel = "EN 16931"
};
report.ExportDocument(StiExportFormat.Pdf, fileStream, settings);

How it works. The visual PDF and the embedded XML describe the same invoice, so the file can be read by a person and imported automatically by accounting software.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.