HTML to PDF converter
Paste HTML (or a URL) and get a print-ready PDF rendered by real Chromium — full CSS support, web fonts, flexbox, grid and background colors. Choose the paper size, margins, orientation and screen or print styles, or fit the whole page on one sheet.
Your PDF appears here
- Edit the example HTML, or switch to Web page and paste a URL.
- Choose the paper size, margins and orientation.
- Press Render to preview it, then download.
Tips for great PDFs
- Set margins with
@page { margin: 18mm }. - Force page breaks with
break-before: page. - Avoid splitting rows:
tr { break-inside: avoid }. - Load fonts with
@importfrom Google Fonts — they're embedded in the PDF. - From the API:
page_numbers, header and footer templates and awatermark. See the PDF docs. - Writing in Markdown? The Markdown to PDF tool styles it for you.
Generate PDFs from your app
Invoices, receipts, reports, tickets, certificates: POST your HTML template to the API and get a PDF back. No headless Chrome to babysit, no wkhtmltopdf quirks.
/v1/pdfcurl https://shotlane.dev/v1/pdf \ -H "X-API-Key: $SHOTLANE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"html": "<h1>Invoice #42</h1><p>Total: $20</p>", "paper": "Letter"}' \ -o invoice.pdf
import os from shotlane import Shotlane sl = Shotlane(os.environ["SHOTLANE_API_KEY"]) pdf = sl.pdf(html="<h1>Invoice #42</h1><p>Total: $20</p>", paper="Letter") open("invoice.pdf", "wb").write(pdf)
import { writeFile } from "node:fs/promises"; import { Shotlane } from "./shotlane.mjs"; const sl = new Shotlane(process.env.SHOTLANE_API_KEY); const pdf = await sl.pdf({ html: "<h1>Invoice #42</h1><p>Total: $20</p>" }, { paper: "Letter" }); await writeFile("invoice.pdf", pdf);
100 free renders a month · no credit card · GitHub and Google sign-in
By signing up you agree to the terms. How your data is handled: privacy policy.
Why Chromium instead of wkhtmltopdf?
wkhtmltopdf is built on a WebKit engine from the early 2010s and has been archived; it doesn't support flexbox, CSS grid or many modern features. Shotlane uses current Chromium, so your PDF matches what you see in Chrome's print preview.