faktorei

Engineering notes

What building this actually turned up.

Notes from making e-invoice rendering deterministic and archive-grade. Each one is something that cost us real time and is written down because nobody else had.

  1. The same invoice, the same bytes

    PDF toolchains stamp wall-clock time and a random trailer ID into every file, so the same invoice never renders twice the same. What had to be pinned, why the invoice's own issue date is the right clock, and the five axes it holds across — including amd64 versus arm64.

    Read it →

  2. A currency is not a language

    JPY has no minor unit, so ¥18,000.00 is not a number that exists. Renderers ask the locale how many decimals to print, which fuses two unrelated decisions — and the obvious fix quietly rounds 2.5 hours to 3.

    Read it →

  3. Two syntaxes, one PDF

    EN 16931 arrives as UBL or CII, and a reader should never be able to tell which. The twin-fixture contract that enforces it, why it is checked at the semantic stage, and the byte-identical PDFs that come out.

    Read it →

  4. Apache FOP returns the wrong table marker

    FOP 2.8 resolves every retrieve-position-within-table as first-starting, so a carried-forward subtotal is wrong on every page of a multi-page invoice. The full position matrix, the header-side fix that is correct under both readings, and the FOP 2.10 retest that stopped us filing upstream.

    Read it →

More are queued — zero-decimal currencies, byte-deterministic PDF/A, and why the engine refuses to render a glyph it does not have rather than emit tofu. If you want one of those sooner, say so.