ZUGFeRD invoices
| Minimum Version | Q4 2025 |
|---|
ZUGFeRD (acronym for Zentraler User Guide des Forums elektronische Rechnung Deutschland) is a specification for the electronic invoice format of the same name. RadPdfProcessing provides support for embedding of ZUGFeRD invoices.
Creating an Embedded Electronic (ZUGFeRD) Invoice
[C#] Add ZUGFeRD invoice
RadFixedDocument document = new RadFixedDocument();
using (RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document))
{
editor.CharacterProperties.TrySetFont(new FontFamily("Calibri"));
editor.InsertRun("PDF/A-3B Compliant Invoice");
}
;
byte[] bytes = File.ReadAllBytes(@"zugferd-invoice.xml");
document.EmbeddedFiles.AddZugferdInvoice(bytes);
PdfFormatProvider provider = new PdfFormatProvider();
PdfExportSettings settings = new PdfExportSettings();
settings.ComplianceLevel = PdfComplianceLevel.PdfA3B;
provider.ExportSettings = settings;
using (Stream output = File.OpenWrite("exportedInvoice.pdf"))
{
provider.Export(document, output, TimeSpan.FromSeconds(10));
}
Only a single XML invoice attachment is allowed according to the ZUGFeRD standard.
To comply with the PDF/A-3B standard all the fonts in the documents should be embedded, so please avoid using Standard Fonts because they are not being embedded in the document. In .NET Standard/.NET (Target OS: None) environments, fonts beyond the 14 standard ones require a FontsProvider implementation to be resolved correctly.
[C#] Remove ZUGFeRD invoice
if (document.EmbeddedFiles.ContainsZugferdInvoice)
{
document.EmbeddedFiles.RemoveZugferdInvoice();
}
ZugferdConformanceLevel
As of Q4 2025 RadPdfProcessing provides support for specifying the ZUGFeRD (Factur-X) conformance level to use when exporting PDF invoices. Higher levels generally include all requirements of the lower levels and add more structured data to support automated processing and validation scenarios.
RadPdfProcessing offers the functionality to specify the ZugferdConformanceLevel when embedding the invoice. The available options are:
- Minimum: The minimal profile providing only the essential data needed for a compliant e-invoice. Suitable for simple use cases with limited automation.
- Basic: The basic profile providing core structured data for improved interoperability and basic automated processing between trading partners. This is the default value.
- Comfort: The comfort profile with richer structured content, typically aligned with common business requirements to enable advanced automation.
- Extended: The most comprehensive profile including extended data elements to cover advanced or industry-specific scenarios beyond the comfort profile.
RadFixedDocument fixedDocument = new RadFixedDocument();
fixedDocument.EmbeddedFiles.AddZugferdInvoice(File.ReadAllBytes(@"zugferd-invoice.xml"), Telerik.Windows.Documents.Fixed.Model.EmbeddedFiles.ZugferdConformanceLevel.Comfort);