Fullbleed PDF Engine
Generate PDFs from HTML/CSS in Python, Rust, JavaScript, and C#. MIT licensed.
Build invoices, reports, statements, and variable-data print jobs with a deterministic Rust engine. Use the native Rust API, the Python package, or the optional JavaScript and .NET integrations. The Python wheel includes the engine, fonts, and CLI with no required third-party Python packages or system PDF stack. The JavaScript package includes the WebAssembly engine and fonts for Node.js and browser workers; the .NET package includes native libraries for in-process rendering.
Try your own document · Documentation (docs.fullbleed.dev) · Examples · PyPI · crates.io · npm · Release notes · MIT license
Actual Fullbleed output. Open either preview for its PDF, or explore the designed examples with HTML/CSS, data, and font setup.
Compare both designs in HTML/CSS and Python components, with matching page output and runnable source. The component versions use the opt-in 2.6 alpha.
Choose your language
| Language | Install | Start building |
|---|---|---|
| Python | python -m pip install fullbleed |
Python quickstart |
| Rust | cargo add fullbleed |
Native Rust quickstart |
| Node.js / TypeScript | npm install fullbleed |
Node quickstart · Next.js PDF download |
| Browser JavaScript | npm install fullbleed |
PDF components and JSX · React starter · HTML/CSS starter |
| C# / .NET | dotnet add package FullBleed.DotNet |
C# components and styles · NuGet quickstart |
The language packages release independently. The Node quickstart, browser guide and C# quickstart record the tested package and engine versions; downloadable starters pin their dependencies.
JavaScript applications can export styled or unstyled component HTML
and generate PDFs and previews. Import fullbleed in Node or fullbleed/browser
in a web app. Node applications can use a
bounded render queue
and optional process isolation.
FullBleed.DotNet's managed library targets .NET 8 and works with .NET 8, 9, and 10 applications. It includes C# components, native rendering, compiled bindings and previews. Its separate CLI adapter requires the Python CLI. The Python package provides the complete CLI, including compiled variable-data jobs and print profiles; the Rust guide covers the native API.
Your first PDF
Start in the HTML/CSS playground with a designed invoice or report, or choose Open local files to use your own HTML, CSS, images, and fonts. Rendering runs locally in your browser, with no account or document upload.
Download the PDF, or select Python or Node.js under Project language and choose Download project. The ZIP includes your source, assets, fonts, licenses, pinned dependencies, and a script to render the document locally.
Keep the ZIP unchanged, then choose Open saved project in the playground to continue editing on a later visit.
If the output needs work, report a rendering problem with a small example using data and assets you can share publicly. For a guided Python walkthrough, use the notebook in Colab, or start with a local script below.
Python
Python 3.10–3.15 on Windows, macOS, or Linux:
python -m pip install fullbleed
Save this as hello.py, then run python hello.py:
from pathlib import Path
import fullbleed
html = "<h1>Invoice INV-1042</h1><p>Consulting: USD 1,200.00</p>"
css = "@page { size: A4; margin: 20mm; } h1 { color: #175c52; }"
pdf = fullbleed.PdfEngine().render_pdf(html, css)
Path("invoice.pdf").write_bytes(pdf)
Open invoice.pdf. The quickstart adds fonts, previews, and a complete project. The runnable source is in examples/quickstart/hello.py.
Node.js
Use Node.js 22 or newer. Run npm install fullbleed, save this as invoice.mjs, then run node invoice.mjs:
import { writeFile } from 'node:fs/promises';
import { renderPdf } from 'fullbleed';
const result = await renderPdf({
html: '<h1>Invoice INV-1042</h1><p>Consulting: USD 1,200.00</p>',
css: '@page { size: A4; margin: 20mm } h1 { color: #175c52 }',
previewDpi: 96,
});
await writeFile('invoice.pdf', result.pdf);
await writeFile('invoice.png', result.previews[0]);
Open invoice.pdf or its PNG preview. The Node.js quickstart includes a downloadable designed invoice project. The separate Node package supports ESM, CommonJS, and TypeScript. For an application route, use the Next.js starter.
Browser JavaScript
Try the editable browser app to generate an invoice or report, change its HTML/CSS, and download the PDF. Rendering runs locally in a Web Worker; the starter does not upload document inputs to a rendering service.
To build on it, download the complete project.
Extract the ZIP, open a terminal in fullbleed-browser-starter, and use Node.js
22.12 or newer for the development tools:
npm ci
npm run dev
Open the localhost URL printed by Vite. The browser guide
explains adding fullbleed/browser to an existing app, serving its runtime
assets over HTTPS or localhost, cancellation, custom fonts, and static deployment.
This renders supplied static HTML/CSS; it does not capture a live browser page.
Rust
Start with the native Rust quickstart. The fullbleed crate exposes FullBleed::builder() and render_to_buffer(...), with no Python requirement. The guide includes runnable invoice and report examples with explicit fonts and PNG previews, plus the latest hosted Rust API reference.
C# and .NET
Install FullBleed.DotNet in a .NET 8, 9, or 10 project and follow the C# quickstart. Compose documents with ordinary methods, LINQ children and immutable style objects. The component guide explains WithClass, attached stylesheets and inline overrides and includes a complete invoice download with explicit fonts. Existing HTML/CSS templates remain supported. Native rendering runs inside the .NET process on Windows x64, Linux x64, Intel macOS, and Apple Silicon macOS, without a Python or browser runtime.
Author with reusable components
Components are another way to author the same print documents. Use ordinary functions, children and reusable styles instead of writing HTML strings:
- Python components and styling, the stable
fullbleed.uiAPI includes function components,class_nameand document stylesheets. - JavaScript functions and JSX/TSX, try the live invoice or customize the React starter.
- C# components and styles, compose documents with typed methods, LINQ and immutable styles.
Python release channels
| Channel | Install | Component API |
|---|---|---|
| Stable release | python -m pip install fullbleed |
Existing HTML/CSS rendering and fullbleed.ui components |
| Opt-in alpha 2.6.0a14 | python -m pip install --pre "fullbleed==2.6.0a14" |
fullbleed.components: owned styles, named parts, data tables, static Bootstrap helpers, page bands and styled/unstyled HTML export |
The component API remains experimental:
independent-kit integration and independent author feedback still need to be
settled. fullbleed.components is the intended public namespace for the 2.6 API.
Existing fullbleed.ui imports remain supported, and earlier alpha imports from
fullbleed.ui.experimental expose the same objects. See the release-status review and graduation
criteria or
read the current component guide.
The language packages have their own versions and API coverage.
The alpha also adds native PDF links for both HTML and component authors, including internal destinations and wrapped links. This navigation work is separate from the stable 2.5 API and requires alpha 14 rather than an earlier alpha kit.
The complete-document migration guide maps styles, page geometry, metadata, fonts and renderer options from the existing API. Its paired portrait and landscape reports preserve PDF text and rendered output. Both styled and unstyled HTML exports remain available.
Choose your starting point
| You want to build | Start here |
|---|---|
| Distinctive invoices, reports, notices, and statements | Designed showcase with fonts and source |
| A native Rust application | Rust quickstart and runnable examples |
| A Node.js or TypeScript application | Node quickstart and designed invoice project |
| PDFs generated in your web application's browser | Browser worker SDK, editable demo, and complete project |
| A C# or .NET application | NuGet quickstart and designed invoice |
| An invoice from JSON | Complete, checked example |
| Automatic rebuilds while editing HTML/CSS (2.5.0+) | Watch-mode invoice example |
| Catch PDF changes in pull requests | Standalone project with a reviewed baseline and CI workflow |
| A PDF download in FastAPI, Flask, or Django | Runnable web app examples |
| Queued PDF invoices in Laravel | Blade templates, retries, and private downloads (PHP and Python) |
| A PDF response from Rust and Axum | Invoice endpoint with request limits and editable templates |
| PDF generation in AWS Lambda | Python container starter with local runtime checks |
| PDF attachments in an n8n workflow | Webhook-to-PDF workflow and local Docker kit |
| A styled PDF report from a pandas DataFrame | Paginated report with CSV data and verification |
| A styled invoice from CSV | Acme invoice project |
| Simplified Chinese and English in one PDF | Bilingual invoice with explicit fonts and glyph checks |
| A report that flows across pages | Business report example |
| Tagged output with accessibility checks | Accessibility workflow |
| Many documents from one template | Fixed and reflowing variable-data examples |
| Print profiles and PDF/VT record hierarchies | Print output and verification scope |
| A coding-agent or MCP integration | Agent setup |
See generated PDFs and their source →
Why use Fullbleed?
- Simple deployment: prebuilt wheels for 15 platform targets, with no browser or system-font installation needed for the bundled workflow.
- Repeatable documents: explicit assets and metadata, deterministic rendering, and SHA-256 reproducibility checks.
- Document-focused layout: pagination, headers and footers, tables, template overlays, and per-page data.
- Volume workflows: compile a template once, then bind fixed or reflowing records. Measured workloads and limits.
- Inspectable output: PDF inspection, PNG previews, structured diagnostics, and profile verification tooling.
Native previews of unembedded Standard 14 fonts use compact bundled outline
substitutes, so basic Helvetica, Times, Courier, Symbol, and Dingbats text renders
without system fonts. Registered and embedded font programs take precedence.
The font-resolution trace identifies the bundled_substitute outcome; runtime
discovery reports bundled_standard_font_previews. See the
font sources, licenses, and coverage limits.
Fullbleed uses static HTML/CSS as a document layout language. Check the CSS coverage and remaining gaps for your templates. Use a browser when JavaScript or live website behavior is part of the required result.
Profile selection alone does not establish standards conformance. The release evidence records the checks performed and their limits.
Get help and contribute
Ask usage questions and share documents in Discussions. For a reproducible bug or feature proposal, open an issue. The contributor guide covers local setup, tests, and where to make changes.
If Fullbleed is useful to you, support its maintenance through sponsorship, documentation, or a useful example. Sponsorship is optional; Fullbleed remains MIT licensed and free to use.
Agent discovery and integrations
An agent does not need release-specific Fullbleed knowledge. The installed binary generates one canonical contract containing its actual version, selection boundary, capabilities, parser-derived CLI surface, result schemas, PDF profiles, examples, limitations, Agent Skill metadata, MCP tools, and acceptance tasks:
fullbleed agent-manifest --json
# Equivalent canonical form:
fullbleed agent-contract --format json
The committed fullbleed-agent-contract.json, cli_schema.md, and llms.txt are generated from the built wheel. CI rejects version, command, schema, profile, or capability drift. Runtime introspection remains authoritative.
The first-party, versionless skills/fullbleed/SKILL.md teaches tool selection and the render/preview/diagnose/verify loop without duplicating the manual. It is bundled in the wheel and can be exported into any absent or empty agent-skill directory:
fullbleed agent skill-path --json
fullbleed agent export-skill .agents/skills/fullbleed --json
You can also install the Skill directly from a pinned GitHub release with gh skill. The guide shows how to check its source and version; the Python package supplies the rendering engine.
For tool-calling agents, install the separately versioned adapter so the core package remains dependency-free:
python -m pip install fullbleed-mcp
fullbleed-mcp --root .
The stdio server confines document paths to the selected workspace and delegates every engine operation to the installed Fullbleed runtime. It exposes semantic discovery, project creation, render/preview, inspect, verify, assets, and fixed/reflow compiled VDP tools. The dependency-free core also provides fullbleed mcp --root ..
Use Fullbleed when the requested artifact is a deterministic print document built from structured content. Use a browser when the requested artifact is a screenshot or interactive state of an arbitrary live website. Use a general PDF editor when existing page content itself must be rewritten.
Cold-agent testing is available through fullbleed agent-acceptance; compact copyable workflows live in examples/agent_workflows, and the approach-neutral benchmark scaffold lives in agentdocbench.
This README is the canonical usage guide for:
fullbleedCLI (human workflows + machine/agent automation)fullbleedPython bindings (PdfEngine,AssetBundle, batch APIs)
Additional focused references are in docs/:
docs/install-non-technical.md(step-by-step setup for non-technical users)docs/css-coverage.md(validated CSS coverage, parity status, and active gaps)docs/README.mddocs/engine.mddocs/performance-architecture.mddocs/performance-pass-2026-08-04.mddocs/python-api.mddocs/ui-accessibility.mddocs/cli.mddocs/pdf-templates.md
What You Get
- No headless browser requirement for PDF generation.
- Deterministic render pipeline with optional SHA256 output hashing.
- Reproducibility workflow via
--repro-recordand--repro-check. - PDF
1.7as the production-stable default target. - Rust-native PDF template composition for VDP/transactional overlays.
- Native Rust image emission for overlay and finalized compose outputs (
--emit-image) without external PDF raster runtime dependencies. - Feature-driven page-to-template binding with per-page deterministic compose plans.
- Structured JSON result schemas for CI and AI agents.
- Offline-first asset model with explicit remote opt-in.
- Remote project template registry workflows (
new list,new search,new remote). - Python-first extension surface for hackability and custom workflows.
- Python render calls release the GIL while Rust rendering executes.
- Ordered standard-library worker pools for batch rendering and selected internal workloads.
- A deliberately small, license-audited Rust dependency graph and no required third-party Python runtime or build packages.
Concurrency Model
- Python binding render methods release the GIL during Rust execution through the Stable ABI bridge.
- Parallel batch APIs use Fullbleed's ordered standard-library worker pool (
render_pdf_batch_parallel(...)and parallel-to-file variants). - The same bounded worker implementation serves selected internal hotspots such as table layout and JIT paint paths.
- Do not assume every single-document render path will fully saturate all cores end-to-end.
Performance in 2.2
Fullbleed 2.2 retains exact TrueType glyph subsetting and adds compiled fixed-geometry variable-data binding. Across the five independent benchmark fixtures, PDFs are 95.5-97.3% smaller and ordinary warm rendering is 2.90x faster by geometric mean than released 2.0.0.
The new compile-once API freezes an immutable Q32.32 display document and can link it repeatedly
without rerunning HTML parsing, selector matching, layout, pagination, or command planning. For
identical untagged copies in one ordered PDF, CompiledDocument.render_pdf_batch(...) shares each
source page's content stream across the copied page dictionaries. The measured 20-copy lane is
200.7x faster per page by geometric mean than the released 2.0.0 warm renderer; a 1,000-page stress
run sustained 304,479-666,622 pages/s.
The 2.2 compiler includes a genuine fixed-geometry variable-data lane. A compiled invoice with six bound fields rendered 100,000 distinct records in a five-run median of 283.807 ms to memory (352,352 pages/s) and 295.999 ms directly to a flushed 88.1 MB PDF (337,839 pages/s). Including the one-time 4.168 ms compile gives 333,147 direct-file pages/s. The harness verified all 100,000 unique invoice IDs in page order, exact page count, resolved markers, deterministic bytes, and equal buffer/file SHA-256. Reproduce it with:
python tools/benchmark_fullbleed_vdp.py --records 100000 --repeats 5
Fixed-geometry slots may remain inside immutable page-space transforms and clips. The compiler captures that active coordinate-state program once and replays it in each compact record overlay; it does not rerun layout or clone the complete page display list.
Base-14/WinAnsi slot paint keeps the measured byte-patch linker. Registered embedded fonts use a command-level overlay program so each bound value is shaped and included in the font subset while the compiled layout, pagination, and static page stream remain shared. The throughput figures above describe the Base-14 fast lane; they are not claims for registered-font shaping.
The fixed-copy result remains scoped to identical content; the variable-data result is scoped to
paint-only text whose geometry does not reflow. Neither is a claim that arbitrary new HTML or
size-changing records render 200x faster. See
docs/performance-pass-2026-08-04.md for measurements and
docs/performance-architecture.md for the packed vector IR,
typed-binding, virtual-linker, and shader roadmap.
Fullbleed 2.2.5 hardens the third compiler lane introduced in 2.2.4 for
size-changing records: CompiledDocument.render_pdf_reflow_bindings(...). It parses and recovers
the template DOM once and compiles encountered structural flow variants into guarded fixed-point
display programs. Matching records bind directly into those programs; workers execute pre-shaped
text/TJ paint slots, cached static PDF page segments, page-local Deflate, and one ordered linker.
Explicit trusted structural slots use data-fb-bind-html="slot". A value that no compiled variant
can safely place runs ordinary fixed-point layout once to add another variant.
On the independent 1,000-distinct-record case study, the 29-sample hot direct-file median was
216.160 ms: 4,626 records/s and 8,096 pages/s. The 168.995 ms best sample reached 5,917
records/s and 10,355 pages/s. It produced
the exact 1,750-page 500/300/150/50 reflow distribution and verified all 24,900 markers. The
throughput-tuned 6,870,320-byte PDF was deterministic across all samples. With the compact
compression setting, compiled output was also byte-for-byte identical to ordinary rendering:
5,298,961 bytes and SHA-256 bb3c441313a08fb00d3bd15f23a567981f3bbbd550908e3a9fe7a07ca5d7f138.
This is a hot compiled-variant result, not a claim for previously unseen structure. The first
variant-discovery render measured 0.509 s (3,437 pages/s), and the fully cold job including setup,
bindings, compilation, discovery, and write measured 0.588 s (2,975 pages/s). The independently
observed hot-median speedup over the ordinary path was 43.8x.
Install
New to Python or setting up on a fresh machine? Start with docs/install-non-technical.md.
python -m pip install fullbleed
From a local wheel:
python -m pip install C:\path\to\fullbleed-2.6.0a14-cp310-abi3-win_amd64.whl
From a source checkout with Rust installed, no Python build package is needed:
python -m pip install --no-build-isolation --no-deps --editable .
To create deterministic release artifacts directly:
python build_backend/fullbleed_build_backend.py wheel --out dist
python build_backend/fullbleed_build_backend.py sdist --out dist
Platform artifact policy:
- Linux wheels cover
manylinux2014on x86-64, x86, ARM64, ARMv7, s390x, and ppc64le, plusmusllinux_1_2on x86-64, x86, ARM64, and ARMv7. - Windows wheels cover x86-64, x86, and ARM64; macOS wheels cover Intel and Apple silicon.
- The CPython stable ABI allows each platform wheel to support Python 3.10 through 3.15 on standard-GIL CPython.
- CI installs and exercises every built wheel on its target architecture, using native runners or QEMU as appropriate. The x86-64 manylinux wheel is additionally tested on every supported Python version before publication.
Python 3.15 final checks exercise both the development wheel and public stable release. They run the matching Python suite and compare PDFs and previews byte for byte against Python 3.10. Published-wheel checks cover Windows and Linux x64 plus Intel and Apple-silicon Macs. See the compatibility evidence and its scope.
Verify command surface:
fullbleed --help
fullbleed capabilities --json
fullbleed doctor --json
60-Second Quick Start (Project Happy Path)
Initialize project scaffold:
fullbleed init .
fullbleed init now vendors Bootstrap (5.0.0) into vendor/css/bootstrap.min.css,
vendors Bootstrap Icons (1.11.3) into vendor/icons/bootstrap-icons.svg,
vendors inter into vendor/fonts/Inter-Variable.ttf, writes license notices
(vendor/css/LICENSE.bootstrap.txt, vendor/icons/LICENSE.bootstrap-icons.txt, vendor/fonts/LICENSE.inter.txt),
and seeds assets.lock.json with pinned hashes.
The scaffolded report.py also runs a component mount smoke validation before
main render and writes output/component_mount_validation.json (fails fast on
missing glyphs, actual pagination overflow, or CSS miss signals). On current engines,
render-time pagination is authoritative for overflow; conservative JIT placement bounds
remain the compatibility fallback for older engines.
Scaffolded components now include components/primitives.py with reusable
layout/content helpers (Stack, Row, Text, table/list helpers, key/value rows, etc.).
Each scaffolded project also includes SCAFFOLDING.md, which should be your
first read before restructuring components.
It also includes AGENTS.md, which preserves the installed-runtime-first
document workflow across future coding-agent sessions without making other
document tools categorically forbidden.
Install additional project assets (defaults to ./vendor/... in project context):
fullbleed assets install inter --json
Bootstrap baseline note:
- We target Bootstrap (
5.0.0) as the default styling baseline for project workflows. - Re-run
fullbleed assets install bootstrap --jsononly if you want to explicitly refresh/bootstrap-manage outsideinit.
Render using the scaffolded component pipeline:
python report.py
Expected artifacts from scaffolded report.py:
output/report.pdfoutput/report_page1.png(or equivalent page preview from engine image APIs)output/component_mount_validation.jsonoutput/css_layers.json
Canonical static PDF reference:
python examples/canonical_reference/report.py
examples/canonical_reference/ is the exhaustive scaffold-shaped reference for
component composition, layered CSS, bundled fonts/SVG, inline SVG, raster data
URIs, linked and standalone HTML artifacts, PDF output, PNG previews, and
validation reports.
Project Bootstrap Templates (fullbleed new)
Use local starters:
fullbleed new local invoice ./my-invoice
fullbleed new local statement ./my-statement
fullbleed new local accessible ./my-accessible-doc
fullbleed new local reference ./my-reference-doc
Discover remote starters from the registry:
fullbleed new list --json
fullbleed new search components --json
fullbleed new remote component-showcase ./my-documents --version 0.1.3 --json
The showcase contains the Northstar invoice and Common Ground report in both
HTML/CSS and Python components, plus the authored accessible community guide.
The paired designs share data, fonts, CSS and artwork. The
installer copies source files; it does not install dependencies or execute the
project. Each kit pins its tested component prerelease in requirements.txt.
Follow the kit guide pinned to alpha 8
to install it in a separate environment, compare the four pages, and edit with
a live PDF preview. For a smaller starting point, choose the
python-components starter
at template version 0.1.2; that smaller kit retains its tested a6 runtime pin.
fullbleed new local accessible is the verbose accessibility-first starter and
demonstrates the fullbleed.accessibility runtime surface (engine verifier,
PMR, PDF/UA-targeted seed checks, and non-visual trace artifacts).
fullbleed new local reference vendors the canonical static PDF reference shape
as a scaffolded project with component layers, assets, PDF/PNG outputs, page data,
and validation reports.
Optional registry override (for private/canary registries):
fullbleed new list --registry https://example.com/manifest.json --json
or:
set FULLBLEED_TEMPLATE_REGISTRY=https://example.com/manifest.json
fullbleed new search statement --json
Scaffold-First Workflow (Recommended)
fullbleed init is designed for component-first authoring rather than a single large HTML template.
Typical scaffold layout:
.
|-- SCAFFOLDING.md
|-- COMPLIANCE.md
|-- report.py
|-- components/
| |-- fb_ui.py
| |-- primitives.py
| |-- header.py
| |-- body.py
| |-- footer.py
| `-- styles/
| |-- primitives.css
| |-- header.css
| |-- body.css
| `-- footer.css
|-- styles/
| |-- tokens.css
| `-- report.css
|-- vendor/
| |-- css/
| |-- fonts/
| `-- icons/
`-- output/
Best-practice authoring model:
- Read
SCAFFOLDING.mdfirst for project conventions. - Keep composition and data loading in
report.py. - Keep reusable component building blocks in
components/primitives.py. - Keep section markup in
components/header.py,components/body.py,components/footer.py. - Keep component-local styles in
components/styles/*.css. - Keep page tokens/composition styles in
styles/tokens.cssandstyles/report.css.
Recommended CSS layer order:
styles/tokens.csscomponents/styles/primitives.csscomponents/styles/header.csscomponents/styles/body.csscomponents/styles/footer.cssstyles/report.css
Recommended iteration loop:
- Edit data loading + component props in
report.py. - Edit component markup in
components/*.py. - Edit styles in
components/styles/*.cssandstyles/*.css. - Run
python report.py. - Review
output/report_page1.png,output/component_mount_validation.json, andoutput/css_layers.json.
Optional scaffold diagnostics:
FULLBLEED_DEBUG=1to emit JIT traces.FULLBLEED_PERF=1to emit perf traces.FULLBLEED_EMIT_PAGE_DATA=1to persist page data JSON.FULLBLEED_IMAGE_DPI=144(or higher) for preview resolution.FULLBLEED_VALIDATE_STRICT=1for stricter validation gates in CI.