Embed e-invoice
Learn how to embed e-invoices such as ZUGFeRD or Factur-X into PDF files using the Pdftools SDK, ensuring compliance with international e-invoicing standards. This guide outlines the key features and requirements for integrating e-invoices using the SDK.
What are ZUGFeRD and Factur-X?
ZUGFeRD and Factur-X are hybrid e-invoicing standards that combine human-readable PDF/A-3 documents with embedded XML data for automated processing. Originally developed in Germany, ZUGFeRD was later aligned with the French Factur-X standard as part of the Franco-German digital agenda. Both standards conform to the European norm EN 16931, making them suitable for cross-border invoicing within the European Union.
For more details about why to use the e-invoice formats presented in this guide, review ZUGFeRD - A standard for electronic invoices in PDF/A format.
Full implementation example
For a complete example of embedding ZUGFeRD or Factur-X invoices using the PdfTools SDK, review Create a ZUGFeRD invoice code sample.
PDF/A-3 Compliance and invoice embedding
ZUGFeRD and Factur-X invoices require embedding structured XML data within a PDF/A-3 document. The PdfTools SDK integrates this process into its PDF-to-PDF/A conversion interface, ensuring the final document meets the necessary compliance requirements. As a result, invoices can only be embedded as part of a PDF/A-3 conversion. For information on converting any PDF into a PDF/A, review the Archive a PDF document to PDF/A.
Supported invoice formats and profiles
The PdfTools SDK supports multiple versions and profiles of ZUGFeRD and Factur-X, including:
- ZUGFeRD 1.0: Basic, Comfort, Extended
- ZUGFeRD 2.0 or 2.1: Minimum, Basic WL, Basic, EN 16931, Extended, XRechnung
- Factur-X 1.0: Minimum, Basic WL, Basic, EN 16931, Extended
The Pdftools SDK automatically detects the invoice type and version, ensuring seamless integration into the PDF without requiring manual specification.
XML invoice handling
The SDK does not perform full validation of the invoice XML. Instead, it extracts key data elements necessary for correct integration into the PDF. The user's responsibility is to ensure the validity and correctness of the invoice XML. The SDK verifies specific fields to determine the invoice type and version but does not enforce full schema validation.