Klicke hier für den deutschen Artikel.
Introduction
By using List & Label, invoice data can be generated and processed in accordance with the ZUGFeRD standard. The PDF files generated by List & Label can be created in ZUGFeRD-compliant PDF/A-3 format together with the XML data provided by the application. Further general details can be found in the article ZUGFeRD, Factur-X and XRechnung – Electronic Invoice Formats in List & Label.
Starting with List & Label version 31.000, support is provided for ZUGFeRD version 2.3; starting with version 31.001, support is also provided for ZUGFeRD version 2.4.
Implementation
The necessary XML file to be embedded in the PDF must be created and provided by the application itself.
Tip: The article Create ZUGFeRD XML files and embed them in PDF can help you create the ZUGFeRD-compliant XML file.
It is then sufficient to simply set the export option PDF.ZUGFeRDXmlPath to the path of the created XML file in List & Label. The rest is then taken over by List & Label itself:
.NET/C#
...
// Define path to the ZUGFeRD XML file
string xmlPath = @"C:\temp\ZUGFeRD-invoice.xml";
// Define List & Label export configuration with ZUGFeRD XML file
ExportConfiguration exportConfig =
new ExportConfiguration("PDF", @"C:\temp\Output.pdf", "invoice.lst");
exportConfig.ExportOptions.Add(LlExportOption.PdfZUGFeRDXmlPath, xmlPath);
// Start export
LL.Export(exportConfig);
...
Delphi (VCL/FireDAC)
...
// Define path to the ZUGFeRD XML file
xmlPath := 'C:\temp\ZUGFeRD-invoice.xml';
// Define List & Label export configuration with ZUGFeRD XML file
exportConfig := TLlExportConfiguration.Create
(TLlExportTarget.Pdf, 'C:\temp\Output.pdf', 'invoice.lst');
exportConfig.ExportOptions.Add(TLlExportOption.PdfZUGFeRDXmlPath, xmlPath);
// Start export
ListLabel.Export(exportConfig);
...
Native API/C++
// Define path to the ZUGFeRD XML file
CString sXmlPath = _T("C:\\\temp\\ZUGFeRD-invoice.xml");
// Define List & Label export options with ZUGFeRD XML file and silent PDF export
::LlXSetParameter(m_hLlJob, LL_LLX_EXTENSIONTYPE_EXPORT, _T("PDF"),
_T("PDF.ZUGFeRDXmlPath"), sXmlPath);
::LlXSetParameter(m_hLlJob, LL_LLX_EXTENSIONTYPE_EXPORT, _T("PDF"),
_T("Export.File"), _T("output.pdf"));
::LlXSetParameter(m_hLlJob, LL_LLX_EXTENSIONTYPE_EXPORT, _T("PDF"),
_T("Export.Path"), _T("C:\\temp\\"));
::LlXSetParameter(m_hLlJob, LL_LLX_EXTENSIONTYPE_EXPORT, _T("PDF"),
_T("Export.Quiet"), _T("1"));
// Start export process with the defined options
if (::LlPrintStart(pJDR->_hJob, LL_PROJECT_LIST,
_T("invoice.lst"), LL_PRINT_EXPORT, 0) < 0)
return; // Error
// Define explicit export format to PDF
::LlPrintSetOptionString(m_hLlJob, LL_PRNOPTSTR_EXPORT, _T("PDF"));
// Now process with the printing loop by calling ::LlPrint(),
// ::LlPrintFields(), ::LlPrintEnd() etc.
// ...