Read ZUGFeRD XML and display it as a PDF
The Reader reads an existing ZUGFeRD/Factur-X invoice (as a plain XML file or as a PDF with embedded XML), exposes every invoice field as a typed .NET view model and renders a readable PDF view of the invoice – for display at the recipient’s end or for further processing in your own application.
Free – no license key required
- .NET Framework 4.8
- .NET 8
- .NET 10
- ZUGFeRD 2.5.2 / Factur-X 1.09.2
- XRechnung 3.0 (CII & UBL)
dotnet add package Facturexa.ZugferdReader
Install-Package Facturexa.ZugferdReader
XML or PDF as input
Both a plain ZUGFeRD/Factur-X or XRechnung XML (CII or UBL) and an invoice PDF with embedded XML can be read – the embedded XML is extracted automatically.
Complete view model
ZugferdReader.Read(...) returns every invoice field – header data,
parties, lines, taxes, payment information – as a simple, typed .NET object for your
own processing.
Readable PDF view
ZugferdReader.CreatePdf(...) renders a human-readable PDF view of the
invoice from the same data (header, line and totals sections) – a view only, not a
PDF/A-3 with embedded XML.
Integration made simple
A single call turns a ZUGFeRD XML into a readable PDF view. The example below mirrors the actual flow used by the live demo on this site.
using Facturexa.ZugferdReader;
// Read the XML (or a PDF with embedded XML) - returns every invoice field as a view model.
var invoice = ZugferdReader.Read(xmlOrPdfStream, fileName: "factur-x.xml");
Console.WriteLine(invoice.InvoiceNumber);
Console.WriteLine(invoice.Seller?.Name);
Console.WriteLine(invoice.GrandTotalAmount);
// Render a readable PDF view from the same view model (no re-parsing needed).
byte[] pdfBytes = ZugferdReader.CreatePdf(invoice);
// Or in one step, straight from the file:
using var stream2 = File.OpenRead("factur-x.xml");
byte[] pdfBytes2 = ZugferdReader.CreatePdf(stream2, fileName: "factur-x.xml");
Validator and Creator in one license
Validate and create e-invoices – for incoming and outgoing invoices alike. The Reader is free.