Rebuild your PDF when you save CSS

Editing an invoice layout usually means a small change, another render command, and another look at the PDF. Fullbleed 2.5 adds render --watch to keep that loop running while you work.

The command renders once, watches your input files, and rebuilds after saves. It can write PNG previews alongside the PDF, using the same rendering engine and bundled fonts. The watcher uses Python's standard library, so there is no extra runtime package to install.

Try a complete invoice

In a Python 3.10–3.14 virtual environment, install the new release and get the example:

python -m pip install --upgrade "fullbleed>=2.5.0,<3"
git clone https://github.com/fullbleed-engine/fullbleed-official.git
cd fullbleed-official/examples/render_watch

Then start the watcher:

python -m fullbleed render --html invoice.html --css styles.css --asset "@noto-sans" --out invoice.pdf --emit-image preview --watch

Open invoice.pdf or its PNG in preview/. Change the heading color in styles.css, save, and inspect the regenerated file. Fullbleed writes the files; a viewer that reloads changed files handles the live display. If a Windows PDF viewer locks the output, close it or use the PNG preview.

Press Ctrl-C to stop. Remove --watch when you want one render.

Watch the dependencies you use

Explicit HTML, CSS, and asset inputs are watched automatically. Add other files or recursive directories with repeated --watch-path options. Fullbleed does not discover every path inside a stylesheet or template map, and watching a data file does not rerun a Python script that generates HTML.

The watcher debounces save bursts, recovers when a missing input is restored, and excludes its requested output files from scans. When a successful rebuild has fewer pages, it removes obsolete previews from that session only if they remain unmodified.

Use the result, not just the file

Add --json-only before render to receive newline-delimited render results and errors. Successful results include a PDF SHA-256. A failed quality gate may already have written a PDF, so inspect the latest result before delivering output.

Watch mode is an editing aid. Use an ordinary one-shot render or verify command for your delivery or CI gate.

Read the complete watch guide · Get the invoice source · Read the 2.5.0 release notes

Published by the Fullbleed project with AI-assisted writing and implementation. Commands and behavior were checked against the released package; verification artifacts are linked from the release.

Previous
Previous

Generate PDF invoices in Next.js with HTML and CSS

Next
Next

Download a PDF invoice from FastAPI, Flask, or Django