WeasyPrint or Gotenberg for HTML to PDF
Both engines are hosted here behind the same key. WeasyPrint lays out print CSS without a browser. Gotenberg runs Chromium and LibreOffice.
Last updated
| Gotenberg | Open source (MIT); a Docker image with Chromium, LibreOffice, QPDF, pdfcpu and ExifTool; Chromium runs JavaScript (as of Sep 2026) |
|---|---|
| WeasyPrint here | WeasyPrint 70; no JavaScript, no URLs; PDF/A-2b and PDF/A-3b on paid plans; 1 credit per render |
Both engines run here, behind one API key and one credit balance.
WeasyPrint is a print engine for HTML and CSS, at
POST /v1/weasyprint/render.
Gotenberg packages Chromium and LibreOffice behind
an HTTP API, under the MIT license (as of Sep 2026). Its routes are hosted
under /v1/gotenberg/ (Gotenberg here).
When Gotenberg fits
- The page needs JavaScript to reach its final state, or you render a live web page.
- You also convert Word, Excel or PowerPoint files, with LibreOffice (gotenberg.dev, as of Sep 2026).
- Your HTML was made for a browser and looks right only in Chromium.
WeasyPrint runs no JavaScript, loads no URLs and converts no Office files.
When WeasyPrint fits
- Print documents with CSS Paged Media: margin boxes, "Page X of Y" and named pages (headers and footers).
- PDF/A-2b or PDF/A-3b for an archive, on a paid plan.
- HTML that must not trigger network requests. Remote URLs are rejected with an error that lists them.
- Documents up to 50 pages, at 1 credit per render whatever the page count.
Paste up to 100 KB of HTML without an account: render it in the free tool.
FAQ
- Is Gotenberg free?
- Yes. It is open source under the MIT license and runs on your own servers (https://gotenberg.dev/, as of Sep 2026). It is also hosted here, behind the same API key and credits as WeasyPrint.
- Which engine should I use for HTML to PDF?
- WeasyPrint for print documents that need no JavaScript: invoices, reports, letters, with page numbers set in CSS. Gotenberg when the page needs a browser to run scripts, or when you also convert Office files.
- Can WeasyPrint convert Office files like Gotenberg?
- No. Gotenberg includes LibreOffice for Office files and Chromium for pages that need JavaScript (https://gotenberg.dev/, as of Sep 2026). WeasyPrint converts HTML to PDF and nothing else.