WeasyPrint alternative for browser-accurate PDFs

WeasyPrint is a solid, actively maintained library — but it is not a browser. Here is where that distinction matters and when a Chromium-based renderer is the better fit.

WeasyPrint implements the print-oriented parts of CSS carefully and produces excellent typographic output for documents built specifically for it. It runs no JavaScript, and its layout engine is its own rather than a browser's, so pages designed for the screen do not always transfer intact.

The practical split: if your document is authored as a document — an invoice, a contract, a statement — WeasyPrint is a fine choice and needs no browser. If your source is a real web page, one that relies on flexbox and grid or renders content with JavaScript, a Chromium-based renderer will match what you see in the browser.

PDFGeny uses both. Chromium handles web content, WeasyPrint handles table-heavy documents where it produces cleaner output — you do not choose, the API does.

Questions

Is WeasyPrint bad?

No — it is well maintained and produces high-quality output for documents authored for print. It simply is not a browser, so it runs no JavaScript.

When should I switch?

When your input is a web page rather than a purpose-built document, or when you would rather not run and scale a rendering library yourself.

Try it without signing up: convert HTML to PDF, or read the API docs.