Skip to content

Try the released PDF engine directly in the browser - #7

Merged
krflol merged 2 commits into
mainfrom
feat/browser-playground
Oct 1, 2026
Merged

krflol merged 2 commits into
mainfrom
feat/browser-playground

Conversation

@krflol

@krflol krflol commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Visitors can now edit HTML/CSS and generate Fullbleed PDFs directly on the documentation site, without an account or a local install. The playground opens with the designed invoice and also includes the illustrated three-page report and service notice, with embedded fonts, page navigation, source downloads, and PDF downloads.

An optional Rust adapter pins the published fullbleed 2.5.0 crate and compiles it to WASI. A worker runs it against an in-memory filesystem using the pinned browser_wasi_shim 0.4.2 package. User source is never added to the page DOM or submitted to a server. No core-engine or Python-package change is needed. Builds retain dependency/font licenses, source hashes, and verification records.

The demo enforces a six-page/200 KB source limit, 256 MiB WASM memory ceiling, a render timeout, cancellation, and clean recovery after errors. These limits are specific to the website demo.

Validation:

  • Native Windows and WASI PDF/PNG bytes match for the invoice, report, notice, and a text/palette edit; repeated renders match.
  • Rust source/page limits, the module memory ceiling, and recovery after failures passed.
  • Actual Chromium-generated downloads matched the native fixtures; page navigation, stale-download handling, source downloads, cancellation, failed asset loading/retry, and retained in-tab edits passed.
  • Remote-image and inline-script canaries caused no document network requests; no non-GET requests were observed during the browser checks.
  • Desktop/mobile visuals reviewed; no horizontal overflow at 320, 390, 768, or 1440 pixels. Keyboard tab switching passed.
  • Strict MkDocs build and 45-page link/anchor/metadata check passed.
  • Downloaded CSS and the licensed font ZIP reproduced the edited browser PDF byte-for-byte with the documented public Python 2.5.0 CLI command.

The documentation CI now rebuilds and verifies the native and WASI adapter before deploying, and uploads its evidence. These checks cover the included fixtures, not universal browser parity or PDF conformance certification.

@krflol
krflol merged commit d8e3103 into main Oct 1, 2026
2 checks passed
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