How kikk79/zugferd-studio works
ZUGFeRD Studio is a local invoice-to-hybrid-PDF application. Users load a PDF or Word invoice, review and correct extracted fields, then generate and save a ZUGFeRD/Factur-X PDF. The API coordinates extraction, calculation and validation, XML/PDF generation, business-rule checks, and output handling. The graph reflects the documented workflow and sampled calls; unsampled route details and session-storage wiring are not expanded beyond the available evidence.
Main entry points: app.py Local API · invoice_logic.py Invoice calculations · output.py Output handling · launcher.py Desktop launcher
Components 13
User interface
- Browser editor
static/app.js
Invoice workflow
- Local API
app.py - Document extraction
extractor.py - ZUGFeRD XML and PDF
zugferd_generator.py - PDF rendering
pdf_renderer.py
Calculation and validation
- Invoice calculations
invoice_logic.py - Business-rule check
schematron.py
Output and runtime
- Output handling
output.py - Runtime paths
paths.py - Desktop launcher
launcher.py - Saved invoice PDF
Other components
- Invoice user
- Java runtime
Connections 16
- Invoice user → Browser editor: opens and edits
README.md - Browser editor → Local API: uploads and calculates
static/app.js - Desktop launcher → Local API: starts server
launcher.py - Desktop launcher → Local API: hands off files
launcher.py - Local API → Document extraction: extracts invoice data
app.py - Document extraction → Invoice calculations: parses amounts
extractor.py - Local API → Invoice calculations: calculates and validates
app.py - Local API → PDF rendering: converts or renders PDF
app.py - PDF rendering → Invoice calculations: uses shared totals
pdf_renderer.py - Local API → ZUGFeRD XML and PDF: builds hybrid invoice
app.py - ZUGFeRD XML and PDF → Invoice calculations: uses shared totals
zugferd_generator.py - Local API → Business-rule check: checks business rules
app.py - Business-rule check → Java runtime: runs Saxon checks
schematron.py - Local API → Output handling: saves generated PDF
app.py - Output handling → Runtime paths: resolves fallback folder
output.py - Output handling → Saved invoice PDF: writes result
output.py