<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mitsuru</title>
    <description>The latest articles on DEV Community by mitsuru (@mitsuru).</description>
    <link>https://dev.to/mitsuru</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3897304%2Ff59fe6c9-e8d8-46f9-b01d-54c028bf14fa.png</url>
      <title>DEV Community: mitsuru</title>
      <link>https://dev.to/mitsuru</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mitsuru"/>
    <language>en</language>
    <item>
      <title>Introducing fulgur: a blazing fast HTML-to-PDF engine in Rust — no browser required</title>
      <dc:creator>mitsuru</dc:creator>
      <pubDate>Sat, 25 Apr 2026 10:03:22 +0000</pubDate>
      <link>https://dev.to/mitsuru/introducing-fulgur-a-blazing-fast-html-to-pdf-engine-in-rust-no-browser-required-ghl</link>
      <guid>https://dev.to/mitsuru/introducing-fulgur-a-blazing-fast-html-to-pdf-engine-in-rust-no-browser-required-ghl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;fulgur&lt;/strong&gt; — &lt;em&gt;(noun, Latin)&lt;/em&gt; lightning, flash of lightning.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I've been building &lt;a href="https://github.com/fulgur-rs/fulgur" rel="noopener noreferrer"&gt;&lt;strong&gt;fulgur&lt;/strong&gt;&lt;/a&gt;, an HTML-to-PDF engine written in Rust. No headless browser, no Chromium, no WebKit — just an HTML parser, a layout engine, and a PDF writer, glued together with a pagination layer.&lt;/p&gt;

&lt;p&gt;The current numbers (v0.5.14, 200-page document):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;190 ms&lt;/strong&gt; end-to-end&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;57 MB&lt;/strong&gt; peak memory&lt;/li&gt;
&lt;li&gt;Byte-identical PDF output across runs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This post is the story of how it got there: why I started it, what it's built on, what it can do today, and how I've been working with AI tools to ship it as a solo project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why build yet another HTML-to-PDF tool?
&lt;/h2&gt;

&lt;p&gt;For years, &lt;a href="https://wkhtmltopdf.org/" rel="noopener noreferrer"&gt;wkhtmltopdf&lt;/a&gt; was the default. It's now archived, and the WebKit version it bundles has been frozen for years. Modern CSS doesn't really land there.&lt;/p&gt;

&lt;p&gt;The mainstream replacements all have tradeoffs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Headless Chromium / Puppeteer / Playwright&lt;/strong&gt; — gorgeous output, but you're shipping a browser. Cold start is slow, memory footprint is huge, and "just spin up Chrome in a container" stops being fun the moment you need to render thousands of PDFs a day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WeasyPrint&lt;/strong&gt; — solid CSS Paged Media support, but Python and not particularly fast on big documents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hosted services&lt;/strong&gt; (Gotenberg, DocRaptor, etc.) — great until you can't send the data off-box, or until the per-PDF bill gets uncomfortable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I actually wanted was something that fit on the same server as my app, started instantly, and didn't blow up a Kubernetes pod's memory limit halfway through a 200-page report.&lt;/p&gt;

&lt;p&gt;That's the niche fulgur is going after.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "aha" moment: Blitz + Krilla
&lt;/h2&gt;

&lt;p&gt;The unlock was realizing I didn't have to write a layout engine &lt;em&gt;or&lt;/em&gt; a PDF writer from scratch. Two excellent crates already exist in the Rust ecosystem:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/DioxusLabs/blitz" rel="noopener noreferrer"&gt;Blitz&lt;/a&gt;&lt;/strong&gt; — an HTML rendering engine from the Dioxus project. It does HTML parsing, CSS style resolution, and layout (via &lt;a href="https://github.com/DioxusLabs/taffy" rel="noopener noreferrer"&gt;Taffy&lt;/a&gt; and &lt;a href="https://github.com/linebender/parley" rel="noopener noreferrer"&gt;Parley&lt;/a&gt;). It's not a full browser — no JS runtime, no networking — which is exactly what you want for a PDF tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/LaurenzV/krilla" rel="noopener noreferrer"&gt;Krilla&lt;/a&gt;&lt;/strong&gt; — a high-level PDF writing library. It hides the gnarly parts of the PDF spec behind a clean API: text, shapes, images, gradients, tagged PDF for accessibility, font subsetting, the works.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the question became: can I write the &lt;em&gt;glue&lt;/em&gt; between "Blitz says this box goes here" and "Krilla, please draw text at this coordinate" — plus a pagination layer that splits content across pages?&lt;/p&gt;

&lt;p&gt;Turns out: yes. That glue &lt;em&gt;is&lt;/em&gt; fulgur.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTML / CSS
    │
    ▼
Blitz  ── DOM → style resolution → Taffy layout
    │
    ▼
DOM → Pageable conversion (Block / Paragraph / Image)
    │
    ▼
Pagination  ── split the Pageable tree at page boundaries
    │
    ▼
Krilla  ── draw each page → PDF Surface
    │
    ▼
PDF bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While I was at it, I needed &lt;code&gt;@media print&lt;/code&gt; support for things like print-only stylesheets. So I sent &lt;a href="https://github.com/DioxusLabs/blitz/pull/390" rel="noopener noreferrer"&gt;PR #390 to Blitz&lt;/a&gt; and it got merged upstream. Huge thanks to the Blitz maintainers — fulgur literally wouldn't be feasible without their work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Here's where it gets fun. After landing a font caching change (wrapping the loaded font database in &lt;code&gt;Arc&lt;/code&gt; so we don't reload Noto Sans JP for every page), the numbers shifted from "okay" to "actually production-ready":&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Document&lt;/th&gt;
&lt;th&gt;Engine&lt;/th&gt;
&lt;th&gt;Time (ms)&lt;/th&gt;
&lt;th&gt;Peak Memory (MB)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Large (200 pages)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;fulgur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;190&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;57&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large&lt;/td&gt;
&lt;td&gt;fullbleed&lt;/td&gt;
&lt;td&gt;92&lt;/td&gt;
&lt;td&gt;(n/a)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large&lt;/td&gt;
&lt;td&gt;WeasyPrint&lt;/td&gt;
&lt;td&gt;2,650&lt;/td&gt;
&lt;td&gt;213&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Large&lt;/td&gt;
&lt;td&gt;wkhtmltopdf&lt;/td&gt;
&lt;td&gt;1,180&lt;/td&gt;
&lt;td&gt;198&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;fulgur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;22&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;td&gt;WeasyPrint&lt;/td&gt;
&lt;td&gt;516&lt;/td&gt;
&lt;td&gt;74&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;fulgur&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;18&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things stand out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Memory is the real story.&lt;/strong&gt; 57 MB to render a 200-page document means you can run fulgur inside a normal-sized container without thinking about it. WeasyPrint and wkhtmltopdf use 3–4x more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;190 ms is fast enough that PDF generation stops being a background job.&lt;/strong&gt; You can render on the request path for most documents.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why isn't it even faster? The pipeline does a 2-pass render so that running headers/footers can show &lt;em&gt;"Page X of Y"&lt;/em&gt; — page count needs to be known before laying out the page chrome. That cap is structural; I'd rather have correct page numbering than shave another 50 ms.&lt;/p&gt;

&lt;h2&gt;
  
  
  What v0.5.14 actually does
&lt;/h2&gt;

&lt;p&gt;The version on Zenn was v0.3.0. A lot has shipped since:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic page splitting&lt;/strong&gt; with full CSS pagination control (&lt;code&gt;break-before&lt;/code&gt;, &lt;code&gt;break-after&lt;/code&gt;, &lt;code&gt;break-inside&lt;/code&gt;, &lt;code&gt;orphans&lt;/code&gt;, &lt;code&gt;widows&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSS Generated Content for Paged Media (GCPM)&lt;/strong&gt; — page counters, running headers and footers, margin boxes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in template engine&lt;/strong&gt; — pass an HTML template + JSON data, get a PDF. Powered by &lt;a href="https://github.com/mitsuhiko/minijinja" rel="noopener noreferrer"&gt;MiniJinja&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image embedding&lt;/strong&gt; — PNG, JPEG, GIF&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom font bundling with subsetting&lt;/strong&gt; — TTF, OTF, TTC, WOFF2&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF bookmarks&lt;/strong&gt; auto-generated from &lt;code&gt;h1&lt;/code&gt;–&lt;code&gt;h6&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PDF metadata&lt;/strong&gt; — title, author, keywords, language&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External CSS injection&lt;/strong&gt;, page sizes (A4 / Letter / A3) with landscape, configurable margins&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Quick CLI tour
&lt;/h3&gt;

&lt;p&gt;Install via npm (no Rust toolchain needed):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @fulgur-rs/cli render &lt;span class="nt"&gt;-o&lt;/span&gt; output.pdf input.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or via Cargo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo &lt;span class="nb"&gt;install &lt;/span&gt;fulgur-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Basic usage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Convert a file&lt;/span&gt;
fulgur render &lt;span class="nt"&gt;-o&lt;/span&gt; output.pdf input.html

&lt;span class="c"&gt;# Pipe HTML in&lt;/span&gt;
&lt;span class="nb"&gt;cat &lt;/span&gt;report.html | fulgur render &lt;span class="nt"&gt;--stdin&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; report.pdf

&lt;span class="c"&gt;# Page options&lt;/span&gt;
fulgur render &lt;span class="nt"&gt;-o&lt;/span&gt; output.pdf &lt;span class="nt"&gt;-s&lt;/span&gt; Letter &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="nt"&gt;--margin&lt;/span&gt; &lt;span class="s2"&gt;"20 30"&lt;/span&gt; input.html

&lt;span class="c"&gt;# Bundle fonts and CSS&lt;/span&gt;
fulgur render &lt;span class="nt"&gt;-o&lt;/span&gt; output.pdf &lt;span class="nt"&gt;-f&lt;/span&gt; fonts/NotoSansJP.ttf &lt;span class="nt"&gt;--css&lt;/span&gt; print.css input.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Template + JSON
&lt;/h3&gt;

&lt;p&gt;This is the part I'm most excited about, because it maps cleanly onto how AI agents want to generate documents.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;invoice.html&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Invoice #{{ invoice_number }}&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{{ customer_name }}&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;table&amp;gt;&lt;/span&gt;
  {% for item in items %}
  &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{ item.name }}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;{{ item.price }}&lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
  {% endfor %}
&lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;data.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"invoice_number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"customer_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Acme Corp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Widget"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$10.00"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Gadget"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"$25.00"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fulgur render &lt;span class="nt"&gt;-o&lt;/span&gt; invoice.pdf &lt;span class="nt"&gt;-d&lt;/span&gt; data.json invoice.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An AI agent emitting JSON is a very natural fit for this interface — it doesn't need to know anything about PDFs, just the data shape.&lt;/p&gt;

&lt;h3&gt;
  
  
  As a library
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;fulgur&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;engine&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Engine&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;fulgur&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;config&lt;/span&gt;&lt;span class="p"&gt;::{&lt;/span&gt;&lt;span class="n"&gt;PageSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Margin&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Engine&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="nf"&gt;.page_size&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;PageSize&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;A4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;.margin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;Margin&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;uniform_mm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;20.0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="nf"&gt;.title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"My Document"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;.build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;pdf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt;&lt;span class="nf"&gt;.render_html&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;html&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Honest about where it is today
&lt;/h2&gt;

&lt;p&gt;I want to be upfront about something: fulgur is &lt;strong&gt;not&lt;/strong&gt; "throw any HTML at it and get pixel-perfect PDFs." It's not a browser. It's a pagination-aware renderer that supports a curated subset of HTML and CSS, and within that subset it produces clean, predictable output. Push outside the supported surface and you'll see weird layout, missing styles, or things that just don't render.&lt;/p&gt;

&lt;p&gt;That's a real limitation today, and I'm not going to pretend otherwise.&lt;/p&gt;

&lt;p&gt;But here's the bet I'm making — and the reason I think the curated-subset approach is fine, even good, in 2026:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The consumers of this API are increasingly going to be AI agents, and they already know the web platform.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LLMs have absorbed an enormous amount of HTML and CSS during training. If you give an agent a JSON payload and say "render this as an invoice PDF," it will reach for &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;, &lt;code&gt;flex&lt;/code&gt;, &lt;code&gt;grid&lt;/code&gt;, standard typography — the well-trodden parts of the web platform. Those are exactly the parts I'm prioritizing.&lt;/p&gt;

&lt;p&gt;So the design target isn't "render any webpage as a PDF." It's "give an AI agent a templating surface where its existing web-standards knowledge produces the right document, deterministically, without spinning up a browser." Different goal, different tradeoffs, much smaller surface to get right.&lt;/p&gt;

&lt;p&gt;To keep this honest rather than aspirational, fulgur runs against the &lt;a href="https://web-platform-tests.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;Web Platform Tests&lt;/strong&gt;&lt;/a&gt; suite — the same conformance suite the major browsers use. The pass rate is the metric I'm tracking the supported-subset against, and it climbs with every release. "What does fulgur actually support?" stops being a vibe and becomes a number.&lt;/p&gt;

&lt;p&gt;Current numbers, to be transparent about it:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;WPT suite&lt;/th&gt;
&lt;th&gt;Pass rate&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;css-page&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;62 / 257 (24.1%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;css-multicol&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;27 / 579 (4.7%)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Yes, those are low. They're also the &lt;em&gt;real&lt;/em&gt; numbers, on the parts of the spec fulgur cares most about (Paged Media and multi-column layout). The point of putting them on the table is that they're now a number that can go up, release after release — not a hand-wavy "we support most of CSS." If you file a bug pointing at a specific WPT case that should pass, that's directly actionable.&lt;/p&gt;

&lt;p&gt;That's where fulgur is heading. Today it's already useful for invoice-shaped, report-shaped, form-shaped documents. The supported surface grows — measurably — with every release.&lt;/p&gt;

&lt;h2&gt;
  
  
  Determinism, on purpose
&lt;/h2&gt;

&lt;p&gt;One feature I want to call out separately: &lt;strong&gt;byte-identical output for identical input.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This sounds boring, but it's huge for CI. If your golden PDFs change byte-for-byte every time you re-run the pipeline, diffing them is useless. Fulgur's pipeline (Blitz → Taffy → Parley → Krilla) is deterministic by design.&lt;/p&gt;

&lt;p&gt;The one caveat is fonts: Blitz currently calls &lt;code&gt;fontdb::Database::load_system_fonts()&lt;/code&gt; for SVG &lt;code&gt;&amp;lt;text&amp;gt;&lt;/code&gt; elements, which means the same HTML can produce different output on machines with different system fonts. The repo ships a pinned Noto bundle and a &lt;code&gt;fontconfig&lt;/code&gt; setup that keeps &lt;code&gt;examples/*/index.pdf&lt;/code&gt; byte-identical across CI, so you can get reproducible output today by pointing &lt;code&gt;FONTCONFIG_FILE&lt;/code&gt; at a controlled font set.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I'm building it: AI-driven solo dev
&lt;/h2&gt;

&lt;p&gt;Fulgur is a one-person project, but it's been built with a fairly heavy AI tooling setup. A few things that have actually worked:&lt;/p&gt;

&lt;h3&gt;
  
  
  Claude Code + superpowers
&lt;/h3&gt;

&lt;p&gt;I do most of the implementation work in &lt;a href="https://docs.anthropic.com/en/docs/claude-code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; with the &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;superpowers&lt;/a&gt; plugin. The loop is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Brainstorm&lt;/strong&gt; — talk through the design with Claude before writing anything&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan&lt;/strong&gt; — turn the design into a stepwise implementation plan&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement&lt;/strong&gt; — execute the plan, one chunk at a time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The brainstorm-then-plan structure keeps the agent from wandering off. It's also surprisingly good at catching "wait, this design has a hole" before any code is written.&lt;/p&gt;

&lt;h3&gt;
  
  
  term-cli for the debugger
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/EliasOenal/term-cli" rel="noopener noreferrer"&gt;term-cli&lt;/a&gt; lets an AI agent drive interactive programs through tmux. The killer use case for me is letting Claude Code drive a real debugger.&lt;/p&gt;

&lt;p&gt;Without it, agents tend to fall back to &lt;code&gt;println!&lt;/code&gt; debugging and spiral. With a debugger they can inspect variables directly, set breakpoints, and resolve "why is this layout offset wrong" in one shot. The behavior change is dramatic.&lt;/p&gt;

&lt;h3&gt;
  
  
  AI code review
&lt;/h3&gt;

&lt;p&gt;I run &lt;a href="https://devin.ai/" rel="noopener noreferrer"&gt;Devin Review&lt;/a&gt; and &lt;a href="https://coderabbit.ai/" rel="noopener noreferrer"&gt;CodeRabbit&lt;/a&gt; on every PR. PDF spec edge cases and CSS layout corner cases are exactly the kind of thing where having a second pair of eyes matters, and as a solo maintainer I don't have human reviewers. Both tools have caught real issues, especially around pagination edge cases.&lt;/p&gt;

&lt;p&gt;It's not a substitute for a strong test suite — fulgur has a fixture-based golden PDF test setup — but it's a useful additional layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;A few things on the roadmap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;More language bindings&lt;/strong&gt; — Python (PyO3) and Ruby (Magnus) are already shipping; Node.js (napi-rs) is next.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More GCPM&lt;/strong&gt; — there's still a long tail of CSS Paged Media features&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A proper benchmarking harness&lt;/strong&gt; that runs in CI on every release&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The repo is here, with full README, threat model, and contribution guide:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/fulgur-rs/fulgur" rel="noopener noreferrer"&gt;github.com/fulgur-rs/fulgur&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Site: &lt;strong&gt;&lt;a href="https://fulgur.dev" rel="noopener noreferrer"&gt;fulgur.dev&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you've been looking for a way to generate PDFs at scale without paying the Chromium tax, give it a try. Stars, issues, and PRs all very welcome — and if you hit a CSS edge case that breaks things, please open an issue with a minimal repro. That's the fastest path to fixing it.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>pdf</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
