Facturexa.ZugferdValidator
7.6.1
dotnet add package Facturexa.ZugferdValidator --version 7.6.1
NuGet\Install-Package Facturexa.ZugferdValidator -Version 7.6.1
<PackageReference Include="Facturexa.ZugferdValidator" Version="7.6.1" />
<PackageVersion Include="Facturexa.ZugferdValidator" Version="7.6.1" />
<PackageReference Include="Facturexa.ZugferdValidator" />
paket add Facturexa.ZugferdValidator --version 7.6.1
#r "nuget: Facturexa.ZugferdValidator, 7.6.1"
#:package Facturexa.ZugferdValidator@7.6.1
#addin nuget:?package=Facturexa.ZugferdValidator&version=7.6.1
#tool nuget:?package=Facturexa.ZugferdValidator&version=7.6.1
Facturexa ZUGFeRD Validator
.NET library for validating electronic invoices against the official rule sets – for .NET 10, .NET 8 and .NET Framework 4.7.2 and later, cross-platform.
Features
- ZUGFeRD 2.5.2 / Factur-X 1.09.2: all profiles from MINIMUM to EXTENDED
- KoSIT XRechnung 3.0 and 1.2, each CII and UBL (Invoice and CreditNote)
- Validation exclusively with the official artefacts: XML schema for CII invoices (the official profile schema for each ZUGFeRD profile, CII D16B for XRechnung) and official Schematron
- PDF/A-3 and Factur-X container checks, including extraction of the embedded XML
- One call for the complete invoice: pass the PDF (or the XML) and get the PDF, XML schema and Schematron results in one result
- Supported specifications queryable at runtime via
ZugferdValidatorInfo.SupportedSpecification(also on every result)
The rule sets (Official Schematron\, with the XML schemas under XSD\) are copied next to your application automatically on build – also for classic ASP.NET projects with packages.config, for ClickOnce, on publish and when you include the Validator through a library or NuGet package of your own – and the Validator finds them there automatically. Nothing needs to be configured.
- After downgrading the package, clean or rebuild the solution once so that the older rule set files replace the newer ones.
- Trimming (
PublishTrimmed) and Native AOT are not supported. - Providing the folder yourself: set
<FacturexaContentAutoCopy>false</FacturexaContentAutoCopy>(with PackageReference additionallyExcludeAssets="contentFiles") and pointSchematronChecker.SchematronDirectoryto the folder.
Usage
using Facturexa.ZugferdValidator;
ZugferdValidatorLicense.RegisterLicense("…"); // once at application startup
// PDF or XML (detected from the content): PDF container, XML schema and official Schematron in one call.
var result = ZugferdValidator.Validate("invoice.pdf");
Console.WriteLine(result.IsValid); // no error in any stage
Console.WriteLine(result.IsPdfValid); // PDF container verdict, null for a plain XML
Console.WriteLine(result.IsSchemaValid); // XML schema verdict
foreach (var error in result.Errors)
Console.WriteLine($"{error.Stage}: {error}"); // e.g. "Schematron: BR-CO-15 (BT-112): ..."
Validate also accepts a byte[] or a Stream. result.PdfCheck holds the PDF status lines (PDF/A format, XMP, embedding, attachment name), result.EmbeddedXml the validated XML.
Since 7.4.0 ZugferdPdfReader.ReadZugferdXml(...) and ZugferdPdfValidator.Validate(...) are obsolete; they keep working until 8.0.
License
The Validator requires a commercial license and comes with a free 30-day trial. Register your license key once at application startup:
ZugferdValidatorLicense.RegisterLicense("…");
Pricing: https://facturexa.com/zugferd/License · Licence terms: https://facturexa.com/zugferd/Terms
Links
- Product page: https://facturexa.com/zugferd/Products/Validator
- Live demo: https://facturexa.com/zugferd/validate
- Documentation: https://facturexa.com/zugferd/Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
-
net10.0
- PdfPig (>= 0.1.16)
- SaxonCS-HE (>= 13.1.0)
-
net8.0
- PdfPig (>= 0.1.16)
- SaxonCS-HE (>= 13.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.