URL → PDF

HTML to PDF API

Render any URL to a print-ready A4 PDF, over one HTTP call — backgrounds, fonts and layout as the browser sees them, not a stripped-down print stylesheet.

GET /v1/screenshot?url=...&format=pdf loads the page in a real headless-Chromium browser and prints it — invoices, reports, receipts, saved docs pages, anything you'd otherwise hand-roll with Puppeteer. Same endpoint as the screenshot API, just a different output format.

Try it

request
curl "https://api.rasterly.dev/v1/screenshot?url=https://stripe.com/docs&format=pdf" \
  -H "X-Api-Key: sk_live_..." -o page.pdf

Options stack with the same params as screenshots: full_page isn't needed for PDF (it always paginates the full document), but width/height set the rendering viewport before print, and scale controls device pixel ratio for any embedded raster images.

Common jobs

Why rasterly

Running Puppeteer/Playwright yourself for PDF generation means owning Chromium version drift, memory leaks under load, and a browser process per request unless you build the reuse pooling yourself. rasterly already does that: one browser process is reused across requests, so a warm render is about a second of CPU — which is why it can be from $0.90 per 1,000 renders with a 100/mo free tier, instead of an infra bill you maintain.

FAQ

Does the PDF include background colors and images?
Yes — backgrounds print by default, so a page with a colored hero or a screenshot-style layout comes out looking like the browser, not a stripped-down print stylesheet.
Can I convert raw HTML I generate myself, not just a live URL?
Today the endpoint takes a public URL, not a raw HTML string — render your HTML to a temporary URL (or a route your app already serves) and point rasterly at it.
What page size does it render?
A4 by default, matching what most invoice, report and documentation PDFs expect. It's the same headless-Chromium print pipeline browsers use for Cmd+P.
How is this priced?
A PDF costs the same as a screenshot — from $0.90 per 1,000 renders, with 100 free every month. There's no separate PDF tier or markup.
Start free — 100 renders Try the live demo