Skip to Content
fullbleed.dev
Examples
Accessibility
Docs
Blog
License
GitHub ↗
Home
About
Contact
(0)
Cart (0)
fullbleed.dev
Examples
Accessibility
Docs
Blog
License
GitHub ↗
Home
About
Contact
(0)
Cart (0)
Examples
Accessibility
Docs
Blog
License
GitHub ↗
Home
About
Contact
Build a React PDF editor that keeps downloads in sync
Keenan Finkelstein 10/7/26 Keenan Finkelstein 10/7/26

Build a React PDF editor that keeps downloads in sync

A runnable React and TypeScript editor with editable HTML/CSS. See how the hook handles fast edits, cancellation, and cleanup, then download and adapt the complete project.

Read More

fullbleed

HTML/CSS in. PDF out. An open-source engine for the printed page.

Documentation   /   Examples   /   GitHub   /   Blog   /   Our story   /   Contact

MIT licensed. Free for commercial use.   License details · Accessibility

Accidental Agent Enablement

In order to accomplish my goal of having fullbleed be the best end-to-end authoring platform possible, I added a ton of observability features. Glyph misses, CSS selector misses, a Just in Time Compiler that reports every object draw, etc. all as JSON. I also added a render preview image because previewing/viewing PDFs tends to cause file locks, and I just wanted to be able to spot-check my work. I also implemented all of the Bootstrap 5.0.0 selectors that made sense for a static document, and immediately abstracted away from them. HTML/CSS are great document design standards, but not very ergonomic to work in. As part of this component-first abstraction, I mirrored a familiar library’s “on component mount” semantics, which lets me do an engine render of individual components with their variable data during development, so that the above metrics are captured, and warnings/errors are emitted at the component level. I’ve also added per-page source PDF templating, so that we wouldn’t have to use a PDF manipulation library as an additional step, as most authoring libraries don’t compose, and most composition libraries don’t author. All of this, combined with the image preview, gave agentic AI an absolute game-changing edge when it came to iteratively tackling VDP documents

Metrics and metrics and metrics!

The experiment..

Once I had the engine in a place where I felt it could be genuinely productive, I decided to try something out: I wanted to see how useful agentic AI would be at laying out some documents. I figured it could probably get some fields on the page, and I could iterate to success. I passed it the relevant publications and asked it to give it a try. It ended up treating the entire project as a batch-processing job, pulled samples of every document, and made gold- or near-gold-plated repos for every single one. Most of them are ready for production.. You can understand my hesitation in sharing fully rigged VDP assets that are IRS documents, so the blog will be image-heavy from here

Setting up the repot for iteration

Self correcting layout

A lot of fields to get right!

Conclusion

In the end, it laid out 55 tax documents (I had already started on an I-9 which I dont believe is covered in the publications I provided it). That is including regression tests, covering all permutations of the data AND because we emit all this data anyway, it was kind enough to collect performance results, including documents that were slow, pages per second, etc. All in a single evening!