Factur-X / ZUGFeRD E-Invoicing

Factur-X and ZUGFeRD E-Invoice Generation for Oracle PL/SQL

Create hybrid electronic invoices directly inside Oracle with PL/PDF v5. Generate a human-readable PDF/A-3b invoice together with embedded, machine-readable Factur-X / ZUGFeRD XML based on EN 16931.

Factur-X 1.09.2 · ZUGFeRD 2.5.2 · EN 16931 · PDF/A-3b · Oracle PL/SQL

One invoice for people and software

Factur-X and ZUGFeRD solve a practical e-invoicing problem: people need a readable document, while accounting, ERP and tax systems need structured data. A hybrid invoice combines both in a single file.

Readable PDF invoice

The recipient can open, view, print and archive the invoice as a normal PDF document.

Structured invoice XML

ERP, accounting and automation software can read the embedded XML without extracting invoice data from the visual PDF.

One hybrid document

The XML is embedded in the PDF/A-3 document together with the metadata required by the Factur-X / ZUGFeRD specification.

What are Factur-X and ZUGFeRD?

Factur-X and ZUGFeRD are technically aligned French and German standards for hybrid electronic invoices. They combine structured UN/CEFACT Cross Industry Invoice data with a PDF/A-3 visual representation and are based on the European EN 16931 e-invoicing model.

The current Factur-X 1.09.2 / ZUGFeRD 2.5.2 release provides five profiles, allowing applications to choose the amount of structured invoice data appropriate for a particular workflow.

ProfileTypical use
MINIMUMSmall structured data set used together with the visual invoice.
BASIC WLHeader-level structured invoice data without structured line items.
BASICStructured invoice including line-level information for common business workflows.
EN 16931European semantic invoice model for standards-based electronic invoicing.
EXTENDEDRich invoice model for business requirements beyond the EN 16931 core.

Factur-X / ZUGFeRD support in PL/PDF v5

PL/PDF creates the structured invoice model, validates it, generates the XML and produces the final hybrid PDF/A-3b invoice directly from Oracle PL/SQL.

All five profiles

Generate MINIMUM, BASIC WL, BASIC, EN 16931 and EXTENDED invoices from the same PL/SQL API.

PDF/A-3b carrier

Create the archival PDF container and embed factur-x.xml with the required Factur-X metadata and file relationship.

Invoice validation

Validate required invoice data, profile-specific business rules and supported EN 16931 code-list values before the document is produced.

Data-first or XML-first

Build the invoice through the PL/SQL data API, or load an existing supported Factur-X / ZUGFeRD XML document and generate the PDF representation from it.

Invoices and credit notes

Create normal invoices, credit notes and supported negative-invoice workflows while keeping the visual PDF and embedded structured data together.

Custom visual layout

The structured invoice model is independent from the visual design. Use the supplied reference renderer or build your own PL/PDF invoice layout from the same canonical invoice data.

How invoice generation works

  1. Initialize the required profile. Select MINIMUM, BASIC WL, BASIC, EN 16931 or EXTENDED.
  2. Supply invoice data. Set document, seller, buyer, reference, payment, line, VAT and total information through PL/SQL.
  3. Validate the invoice. PL/PDF checks the supported profile rules and code-list values before output.
  4. Generate the structured XML. The canonical invoice model is serialized as Factur-X / ZUGFeRD XML.
  5. Create the visual invoice. Generate the PDF with the supplied example renderer or your own PL/PDF layout.
  6. Build the hybrid document. PL/PDF produces PDF/A-3b and embeds the invoice XML and metadata in the final PDF.

Generate an EN 16931 invoice in PL/SQL

The Factur-X API works inside the normal Oracle PL/SQL environment. The example below creates a simple EN 16931 invoice, validates the model and generates the hybrid PDF.

declare
  l_pdf blob;
begin
  plpdf_factur.Init(plpdf_factur.c_profile_en16931);

  plpdf_factur.SetInvoice(
    p_invoice_id            => 'INV-2026-001',
    p_issue_date            => date '2026-08-29',
    p_invoice_type_code     => '380',
    p_currency_code         => 'EUR',
    p_business_process_type => 'urn:example:process:billing',
    p_buyer_reference       => 'CUSTOMER-001'
  );

  plpdf_factur.SetSeller(
    p_name                      => 'Example Supplier GmbH',
    p_country_code              => 'DE',
    p_vat_id                    => 'DE123456789',
    p_electronic_address        => '',
    p_electronic_address_scheme => 'EM',
    p_address_line1             => 'Example Strasse 1',
    p_postcode                  => '10115',
    p_city                      => 'Berlin'
  );

  plpdf_factur.SetBuyer(
    p_name                      => 'Example Customer Kft.',
    p_country_code              => 'HU',
    p_electronic_address        => '',
    p_electronic_address_scheme => 'EM',
    p_address_line1             => 'Example utca 1.',
    p_postcode                  => '1111',
    p_city                      => 'Budapest'
  );

  plpdf_factur.AddLine(
    p_line_id           => '1',
    p_item_name         => 'Software licence',
    p_quantity          => 1,
    p_unit_code         => 'C62',
    p_net_unit_price    => 100,
    p_vat_category_code => 'S',
    p_vat_rate          => 19,
    p_line_net_amount   => 100
  );

  plpdf_factur.AddVatBreakdown(
    p_category_code  => 'S',
    p_taxable_amount => 100,
    p_tax_amount     => 19,
    p_rate           => 19
  );

  plpdf_factur.SetPayment(
    p_means_code         => '58',
    p_payment_account_id => 'DE02120300000000202051',
    p_due_date           => date '2026-09-28'
  );

  plpdf_factur.SetTotals(
    p_line_net_total     => 100,
    p_tax_basis_total    => 100,
    p_tax_total          => 19,
    p_grand_total        => 119,
    p_due_payable_amount => 119
  );

  plpdf_factur.Validate;

  plpdf_factur_invoice_example.Generate(
    p_pdf     => l_pdf,
    p_moddate => sysdate
  );

  -- L_PDF now contains the hybrid PDF/A-3b invoice.
end;
/

The supplied renderer is an example implementation. Production applications can use their own visual invoice layout while reading the same validated canonical invoice data from PLPDF_FACTUR.

XML-first workflows

PL/PDF is not limited to invoices created field-by-field in PL/SQL. Existing supported Factur-X / ZUGFeRD XML can be loaded into the same invoice model and used to create the final visual PDF/A-3b document.

Receive structured XML

Load invoice XML supplied by another application, integration layer or business process.

Validate and render

Validate the loaded invoice and use the canonical model to create the human-readable invoice representation.

Produce one hybrid PDF

The original structured invoice information and the visual representation are delivered together in the PDF/A-3b carrier.

Designed for real invoice workflows

Oracle ERP and custom applications

Create the invoice next to the SQL data and PL/SQL business logic that already owns the transaction.

Oracle APEX

Generate standards-based electronic invoices from APEX applications without moving invoice-generation logic to a separate reporting platform.

Batch invoice generation

Use stored PL/SQL and scheduled database jobs to generate hybrid invoices as part of existing billing processes.

Custom invoice designs

Keep your existing PL/PDF document design while adding standards-based structured invoice data and PDF/A-3 packaging.

Validation-oriented implementation

Electronic invoicing is not just about embedding an XML file. The structured data must match the selected profile, business rules, code lists and the PDF carrier metadata expected by the specification.

  • Profile-specific XML generation
  • EN 16931 code-list validation
  • Factur-X / ZUGFeRD carrier metadata
  • PDF/A-3b document generation
  • Credit-note and negative-invoice workflows
  • Data-first and XML-first round trips

Representative PL/PDF output is tested with the official schema and Schematron artefacts and with independent Factur-X / ZUGFeRD validation tools as part of the release process.

Why generate e-invoices inside Oracle?

One database workflow

Invoice data, business rules, XML generation and PDF output can remain in the same Oracle transaction and application architecture.

No separate reporting server

Generate the hybrid invoice from PL/SQL without deploying a separate document-generation service just for Factur-X / ZUGFeRD output.

Fits existing PL/PDF applications

Add structured e-invoicing to existing Oracle reporting and billing systems while continuing to use familiar PL/PDF document-generation capabilities.


Part of the PL/PDF document platform

Combine electronic invoicing with the broader PDF security, accessibility and document-generation capabilities available in PL/PDF.

Digital Signatures

Add standards-based PAdES digital signatures to generated PDF documents directly from Oracle PL/SQL.

Explore Digital Signatures →

Tagged PDF

Create structured PDF output for accessibility-oriented and PDF/UA workflows.

Explore Tagged PDF →

AES-256 Encryption

Protect sensitive PDF documents with AES-256 encryption, passwords and configurable permissions.

Explore AES-256 Encryption →

Evaluate Factur-X / ZUGFeRD generation with PL/PDF

Generate hybrid PDF/A-3b electronic invoices directly in your Oracle database and test the complete PL/SQL workflow with your own invoice data.

PL/PDF
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.