pdf2zugferd
Turn an invoice PDF exported from LibreOffice, OpenOffice or MS Office into a
ZUGFeRD / Factur-X (EN 16931) PDF: the original pages plus an embedded,
schema-validated factur-x.xml.
The invoice data is read straight from the PDF text layer, so no OCR is needed for office-generated PDFs. Seller data and IBAN come from a config file.
Heads-up: template-based tool. This is not a generic PDF-to-e-invoice converter. It only understands one fixed German invoice layout (see Supported invoice layout) and issues invoices without VAT (Kleinunternehmer, § 19 UStG). PDFs with a different layout are rejected, not guessed. The output is provided as is, without warranty: validate it with your own validator before relying on it for legal purposes.
Install
The tool is published on PyPI as
pdf2zugferd (Python >= 3.12). The package, the import name and the command
are all called pdf2zugferd.
uvx pdf2zugferd --help # run without installing
pipx install pdf2zugferd # or: pip install pdf2zugferd
Usage
cp config.example.toml config.toml # fill in your data
pdf2zugferd invoice.pdf -c config.toml # -> invoice_zugferd.pdf
pdf2zugferd invoice.pdf -c config.toml -o out.pdf --xml-only --force
Without Python, download a single-file binary from the GitHub release (Linux, Windows, macOS), or run from source with uv:
uv sync
uv run pdf2zugferd invoice.pdf -c config.toml
Supported invoice layout
The parser targets one fixed template (German labels Rechnungsdatum,
Rechnungsnummer, Kundennummer, a position table, Betrag … €,
Zahlungsziel beträgt N Tage). Totals are cross-checked and the tool aborts
instead of emitting a wrong e-invoice. Invoices are issued without VAT
(Kleinunternehmer, § 19 UStG, tax category E).
Limitations
- The output is not converted to PDF/A-3 (fonts are not re-embedded). Most receiving software only needs the embedded XML; strict PDF/A validators may complain. Export the source as PDF/A-1b from LibreOffice if you need it.
- Scanned PDFs are rejected; run them through OCR (e.g.
ocrmypdf) first.
Development
uv run ruff format . && uv run ruff check .
uv run pytest # unit + e2e (CLI)
uv run bandit -r src && uv run pip-audit --skip-editable
License
Apache-2.0, see LICENSE.
Metadata
Release files for pdf2zugferd 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdf2zugferd-0.1.0.tar.gz | 12.1 kB | With provenance | Details for pdf2zugferd-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdf2zugferd-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pdf2zugferd-0.1.0-py3-none-any.whl |
Total release size: 26.3 kB
Release files / pdf2zugferd-0.1.0.tar.gz
| Download URL | pdf2zugferd-0.1.0.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04b257254a13a389f905e33ca7ba6794582b527c47c3b5c634fb4df9d09c3d11
|
|
BLAKE2b-256 checksum How to use checksums |
f980ff6440882b854f9c2aebe03161cde5c134d02eed3064ff3244a6ee2a0504
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / pdf2zugferd-0.1.0-py3-none-any.whl
| Download URL | pdf2zugferd-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc55caa7790e747587067c277f4d425b4318511f67d19e83feedefcf2dda91d6
|
|
BLAKE2b-256 checksum How to use checksums |
f39de1f0953f38c535b4e75c8adff47684543a25b21962a2c9f22f83ca586ebc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for pdf2zugferd 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pdf2zugferd-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.