HTML to PDF without headless Chrome or Puppeteer

Why DocGen turns HTML and CSS into PDF without a browser, what all three engines share (no page JavaScript), and when you still need Chrome.

The usual way to make a PDF from HTML is to drive headless Chrome with Puppeteer or Playwright and print the page. It works, but you end up running a browser in production for documents that never needed one.

What running Chrome costs you

  • A whole browser per render: a lot of memory, slow cold starts, and a pool to size and restart when pages hang.
  • A heavy container: Chromium, its system libraries and every font your documents need, rebuilt whenever Chrome updates.
  • Sandbox flags, crashed processes and timeouts that your own code has to handle.
  • A JavaScript runtime pointed at your HTML: whatever scripts the document contains run with network access.

What DocGen does instead

You POST HTML, plus optional CSS, to /api/v1/pdf and get the PDF back in the response. The engines lay out HTML and CSS straight into PDF; there is no browser to install, patch or keep warm, on your side or ours. Your code needs an HTTP client and nothing else.

curl -sS --fail-with-body -X POST "https://docgen.novtopro.com/api/v1/pdf" \
  -H "Authorization: Bearer $DOCGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Receipt #1042</h1><p>Paid: 18.00 USD</p>"}' \
  -o receipt.pdf

The floor all three engines share

Tiger, Lion and Wolf differ in how much CSS and pagination they handle, but they share the same floor:

  • No browser: HTML + CSS go straight to PDF.
  • No JavaScript - scripts are skipped
  • Remote http(s) images, stylesheets and fonts load from public addresses only; private, loopback and cloud-metadata addresses are refused. data: URIs always work.
  • No AcroForm, PDF/A, or encryption
  • Asking for an engine your plan doesn't include fails the conversion; there is no silent fallback.

Working without JavaScript

Do in your own code what page scripts would have done, before you send the HTML:

  • Fill templates and compute totals on the server, or let your agent write the finished HTML.
  • Render charts to images first. PNG and JPEG work on every engine; SVG on Lion and Wolf.
  • Turn Markdown into HTML with /api/v1/markdown instead of a client-side renderer.
  • Inline small images as data: URIs so the document doesn't depend on a fetch.

When you still need a browser

DocGen is built for document pipelines, not websites. If the page only exists after JavaScript runs, like a single-page app or a client-side dashboard, if you need screenshots, or if the PDF must match what Chrome shows on screen pixel for pixel, a headless browser is the right tool.

Which engine?

Tiger is the default and comes with every plan: fast, made for simple invoices and receipts, with the lightest CSS. Lion (Pro) is built for paged documents, with fuller CSS, break control and steadier Chinese and Japanese text. Wolf (Pro) has the most complete CSS pagination, for the strictest print layouts. The API docs compare them side by side, with the same invoice rendered by each.

API docs → · Guides