DEV Community

Anthony Leignel
Anthony Leignel

Posted on Edited on

Factur-X EN16931: your invoice is probably not compliant (and you don't know it)

Factur-X EN16931 compliant invoice — XSD, Schematron and PDF/A-3 validated

Many invoicing solutions advertise Factur-X support, but compliance depends on more than generating a PDF with embedded XML.

Few actually pass all three validation levels.


The three levels

Factur-X conformity requires passing all of these:

  • XSD validation: the XML structure is syntactically correct
  • Schematron validation: EN16931 business rules are respected
  • PDF/A-3 validation: the PDF document is archivable with the XML correctly embedded

Where most solutions fail

PDF/A-3 is often the real challenge.

Many PDF generators produce valid-looking invoices but do not generate a PDF that fully satisfies the PDF/A-3 requirements expected by Factur-X.

The XML can be perfectly structured. The invoice can still be rejected.


The combination that works

  • mPDF generates the invoice PDF
  • factur-x (Python) injects the EN16931 XML and produces a compliant PDF/A-3 document

Result: XSD ✅ Schematron ✅ PDF/A-3 ✅

Full note


Go Further

Explore more technical articles

Read more technical notes


https://palks-studio.com

Top comments (0)