<?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.clauneck.workers.dev/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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3897304%2Ff59fe6c9-e8d8-46f9-b01d-54c028bf14fa.png</url>
      <title>DEV Community: mitsuru</title>
      <link>https://dev.clauneck.workers.dev/mitsuru</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.clauneck.workers.dev/feed/mitsuru"/>
    <language>en</language>
    <item>
      <title>fulgur-chart: deterministic SVG/PNG from Chart.js JSON, without JavaScript</title>
      <dc:creator>mitsuru</dc:creator>
      <pubDate>Wed, 24 Jun 2026 12:49:28 +0000</pubDate>
      <link>https://dev.clauneck.workers.dev/mitsuru/fulgur-chart-deterministic-svgpng-from-chartjs-json-without-javascript-2lmk</link>
      <guid>https://dev.clauneck.workers.dev/mitsuru/fulgur-chart-deterministic-svgpng-from-chartjs-json-without-javascript-2lmk</guid>
      <description>&lt;p&gt;A new member has joined the fulgur family.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;fulgur-chart&lt;/strong&gt; — a CLI that takes Chart.js v4-compatible JSON specs and renders deterministic SVG/PNG charts. No browser required.&lt;/p&gt;

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

&lt;p&gt;Two things make it different: it doesn't spin up a browser, and for a fixed version, font, and rendering options, the same JSON input always produces byte-identical output.&lt;/p&gt;

&lt;p&gt;This post covers why I built it, a timing coincidence that made me feel like I was on the right track, and how to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I wanted graphs in PDFs
&lt;/h2&gt;

&lt;p&gt;fulgur and fulgur-chart are built around one idea: &lt;strong&gt;AI agents should be able to generate documents that look good&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There are three steps to that argument.&lt;/p&gt;

&lt;p&gt;First, Markdown isn't expressive enough. For client-facing reports, plain Markdown often undersells otherwise strong content.&lt;/p&gt;

&lt;p&gt;Second, visual quality is persuasive. A well-formatted report lands differently than a wall of text.&lt;/p&gt;

&lt;p&gt;Third — and this is the one I keep coming back to — &lt;strong&gt;in many business workflows, PDF carries more institutional weight than a Markdown file or a transient web page&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That authority has two dimensions. There's a cognitive one: PDFs read as "serious documents." Proposals, reports, invoices — the format itself signals credibility. And there's a technical one: PDF can support digital signatures, encryption, and archival profiles such as PDF/A. That's the ground &lt;a href="https://github.com/fulgur-rs/flpdf" rel="noopener noreferrer"&gt;flpdf&lt;/a&gt; covers, a pure-Rust PDF toolkit modeled on qpdf's workflow.&lt;/p&gt;

&lt;p&gt;So the goal is always PDF, not HTML, not a web page. That's what fulgur is for.&lt;/p&gt;

&lt;p&gt;And a polished report needs charts. But Markdown can't draw charts.&lt;/p&gt;

&lt;p&gt;Which brings me to a problem I already knew was coming: &lt;strong&gt;the Chart.js library requires JavaScript to run&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;fulgur has no browser and no JS runtime, so there was no path to running Chart.js directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The design choice: no JS engine
&lt;/h2&gt;

&lt;p&gt;The obvious alternative was to embed a JavaScript runtime. I could either run Chart.js with a compatible Canvas implementation, or build a JavaScript renderer that consumes Chart.js-style specs and emits SVG directly. Both approaches can be browser-free, offline, and deterministic.&lt;/p&gt;

&lt;p&gt;But I wanted fulgur-chart to remain a Rust-only, data-only pipeline, with no JavaScript runtime and a smaller behavioral surface to audit and maintain. So I chose to interpret a supported subset of Chart.js-compatible JSON directly in Rust.&lt;/p&gt;

&lt;p&gt;fulgur's philosophy is built on five pillars:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No browser required&lt;/strong&gt; — no Chromium, no WebKit, no headless anything. Single binary, fast cold starts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low memory footprint&lt;/strong&gt; — designed for server-side batch processing. Won't eat your container's memory limit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic output&lt;/strong&gt; — same input → byte-for-byte identical PDF, every time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Template + JSON data&lt;/strong&gt; — HTML templates with JSON data for bulk generation. MiniJinja engine built in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline by design&lt;/strong&gt; — no network access. Fonts, images, CSS — everything explicitly bundled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;fulgur-chart inherits this posture. Accepting arbitrary plugin code or dynamic callbacks would make the behavioral surface harder to reason about and test. The static, data-only design keeps it auditable.&lt;/p&gt;

&lt;p&gt;To make the output truly deterministic, I scoped down the input: arbitrary plugin code, callbacks, and animations are excluded. fulgur-chart is data-only and fully static.&lt;/p&gt;

&lt;p&gt;Fonts are bundled too. Noto Sans JP is included so text rendering never depends on the host system. Change the machine and the output stays the same.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Good-looking output. Deterministic output. I chose to chase both.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As a side effect: charts committed to git never show spurious diffs, and re-generating in CI is always safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  The day after I started designing it, Artifacts shipped
&lt;/h2&gt;

&lt;p&gt;Now for the coincidence.&lt;/p&gt;

&lt;p&gt;I committed the initial design document for fulgur-chart on &lt;strong&gt;June 17, 2026&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The next day — &lt;strong&gt;June 18&lt;/strong&gt; — &lt;a href="https://claude.com/blog/artifacts-in-claude-code" rel="noopener noreferrer"&gt;Claude Code Artifacts&lt;/a&gt; was announced.&lt;/p&gt;

&lt;p&gt;Artifacts lets Claude Code generate rich, interactive reports as outputs: PR walkthroughs, dashboards, security reports, cost analyses. Currently in beta for Team and Enterprise: the output is a live, interactive &lt;strong&gt;web page&lt;/strong&gt; viewed in a browser.&lt;/p&gt;

&lt;p&gt;When I saw it, my immediate reaction was: &lt;em&gt;this is exactly the world fulgur is building toward&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The belief I'd been acting on — that Markdown isn't good enough, that visual quality matters, that AI agents should produce proper-looking documents — felt like it had just received an independent signal from Anthropic itself. The timing didn't prove the design, but it was encouraging.&lt;/p&gt;

&lt;p&gt;The directions are different: Artifacts goes toward the &lt;strong&gt;Web&lt;/strong&gt;, fulgur goes toward &lt;strong&gt;PDF&lt;/strong&gt;. Authority, determinism, offline-first. But the underlying conviction is the same: good output matters, and Markdown isn't good enough.&lt;/p&gt;

&lt;p&gt;The contrast actually sharpened fulgur's position rather than blurring it.&lt;/p&gt;

&lt;p&gt;And for good-looking PDF reports, you need charts. That's what fulgur-chart is for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;Basic usage is simple:&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;# Generate SVG from a JSON spec&lt;/span&gt;
fulgur-chart render chart.json &lt;span class="nt"&gt;-o&lt;/span&gt; chart.svg

&lt;span class="c"&gt;# PNG at 2x resolution&lt;/span&gt;
fulgur-chart render chart.json &lt;span class="nt"&gt;-o&lt;/span&gt; chart.png &lt;span class="nt"&gt;--format&lt;/span&gt; png &lt;span class="nt"&gt;--scale&lt;/span&gt; 2

&lt;span class="c"&gt;# Pipe mode (use - for stdin/stdout)&lt;/span&gt;
&lt;span class="nb"&gt;cat &lt;/span&gt;chart.json | fulgur-chart render - &lt;span class="nt"&gt;-o&lt;/span&gt; - &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; chart.svg

&lt;span class="c"&gt;# Batch: process multiple specs&lt;/span&gt;
fulgur-chart render specs/&lt;span class="k"&gt;*&lt;/span&gt;.json &lt;span class="nt"&gt;--out-dir&lt;/span&gt; out/

&lt;span class="c"&gt;# Specify dimensions and use strict mode&lt;/span&gt;
fulgur-chart render chart.json &lt;span class="nt"&gt;-o&lt;/span&gt; chart.svg &lt;span class="nt"&gt;--width&lt;/span&gt; 1024 &lt;span class="nt"&gt;--height&lt;/span&gt; 576 &lt;span class="nt"&gt;--strict&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--format svg|png&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--width &amp;lt;px&amp;gt;&lt;/code&gt; / &lt;code&gt;--height &amp;lt;px&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--scale &amp;lt;factor&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--font &amp;lt;path&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--out-dir &amp;lt;dir&amp;gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--dsl chartjs|vegalite&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;--strict&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The input uses the familiar shape of a Chart.js v4 config. fulgur-chart implements a data-only, static subset: common chart data and selected options work, while callbacks, interactions, and arbitrary plugin code are intentionally excluded.&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;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bar"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&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;"labels"&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="s2"&gt;"Jan"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Feb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mar"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"datasets"&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;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Revenue (k$)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"data"&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="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;150&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"backgroundColor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"#36a2eb"&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;span class="nl"&gt;"options"&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;"plugins"&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;"title"&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;"display"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Monthly Revenue"&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;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;p&gt;Options like &lt;code&gt;options.plugins.title&lt;/code&gt; work as expected. In CI, use &lt;code&gt;--strict&lt;/code&gt; so unsupported options fail loudly instead of being silently ignored.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supported chart types
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://quickchart.io/" rel="noopener noreferrer"&gt;QuickChart&lt;/a&gt; is the closest reference point in terms of input format and chart coverage. It can also be self-hosted; fulgur-chart makes a narrower bet on a single local binary, data-only input, no JavaScript runtime, and deterministic output.&lt;/p&gt;

&lt;p&gt;As of v0.1.x, the supported chart types are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bar chart (vertical/horizontal — use &lt;code&gt;options.indexAxis: "y"&lt;/code&gt; for horizontal)&lt;/li&gt;
&lt;li&gt;Stacked bar chart&lt;/li&gt;
&lt;li&gt;Line chart&lt;/li&gt;
&lt;li&gt;Area chart&lt;/li&gt;
&lt;li&gt;Pie chart / Doughnut chart&lt;/li&gt;
&lt;li&gt;Scatter plot&lt;/li&gt;
&lt;li&gt;Bubble chart&lt;/li&gt;
&lt;li&gt;Radar chart&lt;/li&gt;
&lt;li&gt;Mixed chart&lt;/li&gt;
&lt;li&gt;Matrix / heatmap&lt;/li&gt;
&lt;li&gt;Box plot&lt;/li&gt;
&lt;li&gt;Gauge / Radial gauge&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Progress bar chart&lt;/strong&gt; (QuickChart-compatible)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The progress bar chart is worth calling out. It's a QuickChart original: &lt;code&gt;datasets[0].data&lt;/code&gt; sets the bar values; an optional second dataset's &lt;code&gt;data&lt;/code&gt; overrides the max per bar (default is 100). Percentage labels are on by default — set &lt;code&gt;options.plugins.datalabels.display: false&lt;/code&gt; to hide them.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--dsl vegalite&lt;/code&gt; flag also accepts a Vega-Lite subset if you prefer that format.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it's implemented
&lt;/h2&gt;

&lt;p&gt;Reproducing Chart.js's visual output without a browser is more work than it sounds.&lt;/p&gt;

&lt;p&gt;Layout, axes, legends, text measurement — everything the browser was handling silently has to be done from scratch. Text measurement in particular is critical for determinism: if that drifts, the output drifts. Bundling Noto Sans JP and doing all measurement against that removes the environment as a variable.&lt;/p&gt;

&lt;p&gt;For a fixed fulgur-chart version, font, dimensions, and output format, the output is byte-identical across runs and machines. You can verify this in CI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fulgur-chart render chart.json &lt;span class="nt"&gt;-o&lt;/span&gt; first.svg
fulgur-chart render chart.json &lt;span class="nt"&gt;-o&lt;/span&gt; second.svg
&lt;span class="nb"&gt;sha256sum &lt;/span&gt;first.svg second.svg
&lt;span class="c"&gt;# both hashes should match&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Architecturally, there's a layered design: DSL frontend → intermediate representation (IR) → rendering core. Adding support for a new input dialect (Chart.js, Vega-Lite, or eventually others) means adding a frontend that maps to the IR, without touching the renderer.&lt;/p&gt;

&lt;p&gt;Development is Rust + AI-driven: &lt;a href="https://claude.ai/code" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt; with &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;superpowers&lt;/a&gt;, following a brainstorm → plan → implement cycle. Same approach I've been using for fulgur core — &lt;a href="https://zenn.dev/mitsuru/articles/911642761bf792" rel="noopener noreferrer"&gt;I wrote about that workflow here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Embedding charts into fulgur PDFs
&lt;/h2&gt;

&lt;p&gt;The original motivation was getting charts &lt;em&gt;into PDFs&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The workflow: render an SVG with fulgur-chart, embed it in HTML with &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, then pass the HTML to fulgur. The &lt;code&gt;examples/report.html&lt;/code&gt; in the fulgur-chart repo shows a working example.&lt;/p&gt;

&lt;p&gt;Font consistency matters here. Bundle the same Noto Sans JP in fulgur, and chart text glyphs will match the rest of the PDF exactly — no font mismatch between chart labels and body text.&lt;/p&gt;

&lt;p&gt;That closes the loop:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AI agent → deterministic PDF report, with charts, looking polished, offline.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Where it is now and what's next
&lt;/h2&gt;

&lt;p&gt;As of June 2026, fulgur-chart is still v0.x — young, but the core chart types work.&lt;/p&gt;

&lt;p&gt;The immediate roadmap includes a few gaps in the current implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Value labels on radar chart axes, data labels for scatter/radar&lt;/li&gt;
&lt;li&gt;Dual-axis mixed charts&lt;/li&gt;
&lt;li&gt;Vega-Lite &lt;code&gt;transform&lt;/code&gt;, &lt;code&gt;aggregate&lt;/code&gt;, URL data sources (currently inline &lt;code&gt;data.values&lt;/code&gt; only)&lt;/li&gt;
&lt;li&gt;Font subsetting to reduce binary size&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Longer term, I'm thinking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;More chart types&lt;/strong&gt; — expanding toward full QuickChart coverage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More input formats&lt;/strong&gt; — Graphviz and others in QuickChart's scope&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jsonnet support&lt;/strong&gt; — programmatic spec generation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Server mode&lt;/strong&gt; — run as a persistent API, QuickChart-style&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent skill&lt;/strong&gt; — expose chart generation as a direct tool call for AI agents&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The destination: QuickChart-equivalent coverage, browser-free, deterministic, and ready for AI agents to call directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;The fulgur family keeps growing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/fulgur-rs/fulgur" rel="noopener noreferrer"&gt;fulgur&lt;/a&gt; — HTML → PDF&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/fulgur-rs/flpdf" rel="noopener noreferrer"&gt;flpdf&lt;/a&gt; — pure-Rust PDF toolkit modeled on qpdf&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/fulgur-rs/fulgur-chart" rel="noopener noreferrer"&gt;fulgur-chart&lt;/a&gt; — deterministic chart generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of them are projects I intend to keep building for a long time.&lt;/p&gt;

&lt;p&gt;If any of this sounds useful, give it a try.&lt;/p&gt;

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

</description>
      <category>rust</category>
      <category>pdf</category>
      <category>charts</category>
      <category>opensource</category>
    </item>
    <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.clauneck.workers.dev/mitsuru/introducing-fulgur-a-blazing-fast-html-to-pdf-engine-in-rust-no-browser-required-ghl</link>
      <guid>https://dev.clauneck.workers.dev/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>
