Factur-X / ZUGFeRD Extractor
Extract the embedded CII XML invoice from a PDF/A-3 hybrid file (Factur-X 1.0.7 / ZUGFeRD 2.3), 100 % client-side. No upload, no logs.
Drag and drop a PDF here, or click to pick a file
No file selected
100 % in your browser — no upload, no data sent to ediverse.io.
How it works
A hybrid Factur-X (French, FNFE-MPE) or ZUGFeRD (German, FeRD) invoice is a PDF/A-3 (ISO 19005-3) file embedding an XML attachment that follows the UN/CEFACT Cross-Industry Invoice (CII) schema. The extractor proceeds in five steps:
- Read the PDF header: the
%PDF-1.xsignature is checked and the PDF version is recorded. - Locate the
xref: thestartxrefpointer is followed to the classic cross-reference table (ISO 32000-1 §7.5.4). Each entry gives the offset of an indirect object. - Navigate Catalog → Names → EmbeddedFiles: the
trailerpoints to/Root(the catalog) which exposes a name tree/Names/EmbeddedFilesenumerating attachments (ISO 19005-3 §6.8). A fallback reads the catalog/AF(Associated Files) array. - Extract the XML stream: the file specification
(
/Type /Filespec) references a stream/Type /EmbeddedFile. When the filter is/FlateDecode(the common case), the browser decompresses viaDecompressionStream('deflate'). - Detect the profile: the CII XML carries its URN at
ExchangedDocumentContext/GuidelineSpecifiedDocumentContextParameter/ID. That ID determines the profile: MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED or XRECHNUNG.
Supported conformance profiles
The six profiles defined by Factur-X 1.0.7 (FNFE-MPE) and ZUGFeRD 2.3 (FeRD) are recognised, along with the German XRechnung CIUS (KoSIT). The profile URN is extracted from the embedded XML and surfaced verbatim in the report.
MINIMUM—urn:factur-x.eu:1p0:minimum. Header data only, Factur-X only.BASIC WL—urn:factur-x.eu:1p0:basicwl. Without Lines, no item-level data.BASIC—urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic. EN 16931 subset, minimum required to qualify as a tax invoice.EN 16931—urn:cen.eu:en16931:2017. European core norm (formerly “COMFORT” in ZUGFeRD 1.0).EXTENDED—urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended. EN 16931 plus industry extensions.XRECHNUNG—…urn:xeinkauf.de:kosit:xrechnung_3.0. CIUS mandated by the German public sector.
Limitations
The extractor is intentionally minimal — its goal is to surface the XML, not to replace a full PDF parser:
- Encrypted PDFs (
/Encrypt) are not supported. - Cross-reference streams (PDF 1.5+) are not parsed: we
only handle the classic
xreftable. Every reasonable Factur-X / ZUGFeRD emission chain emits a classic xref for PDF/A compatibility. - Object streams (
/ObjStm) are not supported. -
Only the
/FlateDecode(zlib) filter is decoded. Other rarely-used filters (/ASCII85Decode,/LZWDecode…) returnE_PDF_PARSE_FAILED. - The extractor does not validate the extracted XML — it only detects the profile. Use the EN 16931 validator or the PEPPOL validator to validate the extracted XML.
Privacy
Related documentation
- Factur-X / ZUGFeRD standard — the history, versions and CII structure of the hybrid invoice.
- PEPPOL Validator — validates a UBL invoice; complementary for PEPPOL Network supply chains.
- EN 16931 Validator — the core European norm validator, before Factur-X / XRechnung / PEPPOL BIS CIUSes.
- Sources: FNFE-MPE Factur-X 1.0.7 (fnfe-mpe.org/factur-x/), FeRD ZUGFeRD 2.3 (ferd-net.de), ISO 19005-3 (PDF/A-3), ISO 32000-1 (PDF 1.7).