invoicePress – e-Invoice Viewer — Upload & visualize e-invoices (ZUGFeRD, Factur-X, XRechnung) on your WordPress site

Let your visitors drop an electronic invoice onto your page and see it as a clear, structured view instantly — without any external service and without storing the file. A standalone WordPress plugin that reproduces the core function of the ZUGFeRD Quba viewer, right inside a simple shortcode.

Whether you offer an e-invoice demo, a validation helper, or a customer-facing viewer, this plugin reads ZUGFeRD / Factur-X PDFs and CII / UBL / XRechnung XML files and renders every invoice field — optionally with the matching EN 16931 business-term numbers (BT-…). The result is displayed inline via AJAX, inside a Shadow DOM, so it looks identical in every theme.

Why you’ll love it

  • Reads all common e-invoice formats. ZUGFeRD / Factur-X (PDF), CII (UN/CEFACT) XML and UBL / XRechnung XML — the embedded XML is extracted from PDFs automatically.
  • Drag & drop uploader. Vanilla JavaScript, no framework, no page reload — the structured view appears inline.
  • Complete field coverage. Invoice header, parties, order and delivery data, payment, line items, VAT breakdown, totals, notes and attachments — empty fields shown as placeholders, just like the Quba viewer.
  • EN 16931 business terms. Show or hide the BT numbers live, per setting or via the shortcode attribute bt=”1” / bt=”0”.
  • Theme-independent. Rendered inside a Shadow DOM with a full style reset, so no theme styles leak through — identical look everywhere.
  • No storage. The file is read from the temporary upload only and is never saved.
  • Secure by design. XXE protection, upload validation (extension + MIME + size), nonce-based CSRF protection with a live nonce, and a per-visitor daily rate limit.
  • Translatable. Text domain sp-einvoice-viewer; German translation included.

Key features

Supported invoice formats

ZUGFeRD / Factur-X (PDF) — the embedded XML is extracted and read automatically. CII (UN/CEFACT) XML — read directly. UBL / XRechnung (XML) — converted to CII internally and then read.

Modern, Quba-inspired layout

A single-scroll layout with coloured section tabs (filled = data present, light = empty section): a hero header with the highlighted amount due, followed by invoice data, buyer, seller, order/contract data, delivery information, payment, line items, VAT breakdown, totals, notes and attachments. All fields are always shown — even empty ones — exactly like the original viewer.

EN 16931 business terms (BT numbers)

Each field can be labelled with its EN 16931 business-term number. Visitors toggle the numbers live via a switch in the viewer, and you set the default per embed via the shortcode attribute bt=”1” / bt=”0” or globally in the settings. The field mapping was verified against the official EN 16931 specification.

Theme independence via Shadow DOM

The viewer is rendered inside a Shadow DOM with a full :host style reset and px units throughout, so no inheritable theme styles (font, size, colour, line-height) cross the boundary. The result looks identical in every WordPress theme.

Security & privacy

XXE protection (DOCTYPE rejection, no external entity loader, no network access while parsing), upload validation (extension + finfo MIME check + size limit), nonce-based CSRF protection with a live nonce against page caching, and a per-visitor daily upload rate limit. The file is processed in memory only and is never stored; every invoice value is escaped on output.

Extensible template engine

The data extraction is separated from the HTML rendering, so additional layouts can be added as a template subclass without touching the extraction logic.

Why not pixel-perfect to Quba? The Quba viewer transforms with the KoSIT XRechnung XSLT 3.0 via Saxon-JS; PHP only supports XSLT 1.0. An own, Quba-inspired PHP template is used instead — functionally equivalent, but not the identical KoSIT markup.

How it works

  1. Add the [einvoice_viewer] shortcode to any page or post.
  2. The visitor drops an invoice (PDF or XML) into the viewer.
  3. The file is validated, rate-limited and read on the server; the invoice is rendered to HTML and returned via AJAX.
  4. The structured view is inserted inline — the file is never stored.

Settings

  • Daily uploads per visitor — limit per calendar day (0 = unlimited).
  • Maximum file size — capped by the WordPress upload limit.
  • Trust proxy header — use X-Forwarded-For for the client IP (only behind a trusted reverse proxy).
  • Show BT numbers by default — visitors can still toggle.
  • Layout template — the active view (more can be added).

What’s included

  • The plugin (shortcode, uploader, renderer, settings and the bundled horstoeko libraries).
  • English and German translations (text domain sp-einvoice-viewer).
  • Full documentation in English and German (README + feature overview).

Requirements & compatibility

  • WordPress 5.8+ (tested up to 6.9)
  • PHP 7.4+
  • The bundled vendor/ directory (horstoeko libraries) inside the plugin folder

Changelog

2.0.1

  • Business-term corrections, verified against the official EN 16931 specification (BT-115, BT-28/BT-33, BT-56/BT-41, BT-10, BT-47/BT-30 and the added scheme fields BT-47-1 / BT-30-1).
  • Updated and recompiled translations.
  • Renamed the plugin to “invoicePress – e-Invoice Viewer”; switched the text domain to sp-einvoice-viewer and hardened input handling for the WordPress coding standards.

2.0.0

  • New rectangular Quba-style layout with coloured section tabs and a dedicated card group per line item.
  • Introduced the template engine (data model separated from HTML rendering).
  • Many more fields (BT-127 to BT-160, payment cards, delivery details and more).
  • Colours matched to the invoicePress logo.

You May Also Like