Java-App for creating and validating Factur-X / ZuGFeRD / X-Rechnung invoices conforming with EU-Norm EN 16931.
| Feature | Description |
|---|---|
| 🇪🇺 EU Compliant | Generates invoices conforming to EN 16931, accepted across all EU member states. |
| 🔒 100% Offline & Private | All processing happens locally on your machine. Your invoice data never leaves your computer. |
| 🤖 LocalAI-Powered OCR | Uses local, open-weight AI models for automatic, high-quality text extraction from PDF invoices. |
| 📄 Multi-Page Support | Processes multi-page PDF invoices — each page is OCR'd separately, then semantically merged by the LLM into a single structured result. |
| 🧠 Works with Ollama | Integrates with Ollama for local LLM inference. Default models: glm-ocr:q8_0 (OCR) and qwen3:4b-q8_0 (JSON extraction). |
| 💻 Cross-Platform | Runs on macOS, Linux, and Windows. (macOS and Linux are the primary tested platforms.) |
# Install tooling and dependencies
bash setup.shUsers usually interact with the app via the GUI:
# Start the App (Java)
./start.shYou can also run the OCR pipeline directly via shell:
# Single-page PDF
bun run src/ocr.ts --input demo/verify.pdf --output /tmp/result.json \
--seller-address "Friedrich-Damm-Str. 8, 80999 München" \
--seller-tax-no "147/214/00001"
# Multi-page PDF with custom models
bun run src/ocr.ts --input demo/verify_multipage.pdf --output /tmp/result.json \
--seller-address "Friedrich-Damm-Str. 8, 80999 München" \
--seller-tax-no "147/214/00001" \
--ocr-model glm-ocr:q8_0 --json-model qwen3:4b-q8_0- PDF → Images — Each page is rendered as a high-resolution image.
- Image Preprocessing — Contrast boost, normalization, and resize to max 3MP.
- OCR per Page — Vision model (
glm-ocr:q8_0) extracts text as markdown. - Date Preprocessing — Date ranges in the OCR text are annotated with day counts (e.g.
DAYS: 31) to help the LLM correctly set quantities for time-based line items. - JSON Extraction — All page markdowns are combined and sent in a single LLM call (
qwen3:4b-q8_0) to produce a structured ZUGFeRD-compatible JSON.
Simply drag and drop a PDF invoice into the app. Multi-page PDFs are displayed with tabs on the left side. The AI-powered OCR will automatically extract the text from each page.
The local AI model analyzes the OCR output and intelligently extracts all relevant invoice data. Progress is shown in real-time with per-page OCR status tabs and a JSON extraction log.
Review and edit the extracted line items. The app calculates totals automatically.
Verify the tax calculations and monetary summations.
Click to generate the ZuGFeRD/Factur-X compliant PDF with embedded XML.
The app confirms successful creation and automatically opens the ELSTER e-Rechnung portal for official validation.
Your new e-Invoice is ready.
The demo/ folder contains sample invoice data for testing and demonstration purposes.
MIT, Open Source.
- No network requests. All AI inference runs locally.
- No telemetry. Your data stays on your device.
- Open Source. Audit the code yourself.








