Skip to content

ZUGFeRD PDF/A-3 download (VER-06, CORE-05) - #10

Merged
OnePieceMonkey merged 3 commits into
mainfrom
zugferd
Oct 5, 2026
Merged

OnePieceMonkey merged 3 commits into
mainfrom
zugferd

Conversation

@OnePieceMonkey

Copy link
Copy Markdown
Owner
  • Verifier: Mustang 2.26.0 (pinned, checksum-verified) runs as a child JVM, so its Saxon and PDF stack stay off the KoSIT classpath. One Mustang process at a time.
    • POST /v1/zugferd/combine: CII in → KoSIT re-check (422 if not ACCEPTABLE) → German PDF/A-3 visualization → embed the same XML as ZUGFeRD 2, profile XRECHNUNG → Mustang validation → PDF out. Nothing is returned unless Mustang says valid.
    • POST /v1/zugferd/validate: Mustang check of any PDF.
  • Web: "ZUGFeRD PDF" button next to the XRechnung download, /api/zugferd (rate-limited, CII only, 1 MB).
  • CI: pnpm zugferd:check builds four corpus invoices and expects valid files, and expects a plain PDF to fail.

Checked: four corpus invoices → valid PDF/A-3u ZUGFeRD in 3.2–4.1 s; embedded XML byte-identical to the input (extracted and compared); a plain PDF is reported invalid; broken XML gets 422; end to end through the production image's /api/zugferd. Container memory about 700 MB.

Note: the visual page is Mustang's standard rendering of the data, not the original PDF layout (the uploaded PDF is not PDF/A and may not match the corrected totals).

🤖 Generated with Claude Code

OnePieceMonkey and others added 3 commits October 5, 2026 15:40
The verifier runs Mustang 2.26.0 (pinned, checksum-verified) as a child JVM,
so its Saxon and PDF stack stay off the KoSIT classpath. /v1/zugferd/combine
takes CII, re-checks it with KoSIT, renders a German PDF/A-3 visualization,
embeds the same XML as ZUGFeRD 2 profile XRECHNUNG, and returns the file only
if Mustang's own validation passes; the embedded XML is byte-identical.
/v1/zugferd/validate exposes the Mustang check. The web app gets a ZUGFeRD
button and /api/zugferd; pnpm zugferd:check runs in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Short-lived Mustang JVMs start with C1 only and serial GC (about 1.8x faster
on one CPU), and the service runs in the gen2 execution environment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Verified gallery runs ship a ZUGFeRD file built by the same verifier path
(pnpm --filter @verdict/web gallery:zugferd), so the jury path has no wait.
Live uploads build on demand; 2 vCPU bring that from ~15 s to ~10 s and stay
inside the free tier at demo traffic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OnePieceMonkey

Copy link
Copy Markdown
Owner Author

Follow-ups on this branch: the Mustang JVMs start with C1 + serial GC, the service runs in gen2 with 2 vCPU (live ZUGFeRD ~29 s → ~10 s), and verified gallery runs ship a prebuilt ZUGFeRD file (instant, pnpm --filter @verdict/web gallery:zugferd). Live and checked.

@OnePieceMonkey
OnePieceMonkey merged commit f3f1413 into main Oct 5, 2026
3 checks passed
@OnePieceMonkey
OnePieceMonkey deleted the zugferd branch October 7, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant