HTML to PDF: Web Pages, HTML & Invoice Templates in Bulk avatar

HTML to PDF: Web Pages, HTML & Invoice Templates in Bulk

Pricing

$3.00 / 1,000 pdf createds

Go to Apify Store
HTML to PDF: Web Pages, HTML & Invoice Templates in Bulk

HTML to PDF: Web Pages, HTML & Invoice Templates in Bulk

Turn web pages, HTML documents or an HTML template plus JSON rows (invoices, certificates, reports) into PDFs. Page size, margins, landscape, headers, footers and page numbers. Cookie banners hidden. You only pay for PDFs that succeed.

Pricing

$3.00 / 1,000 pdf createds

Rating

0.0

(0)

Developer

Pandapi

Pandapi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

21 hours ago

Last modified

Features

Limited permissions

Share

Convert web pages, HTML documents or an HTML template filled with JSON data into clean PDF files, with a real Chrome browser.

  • 🌐 URL to PDF: any public page, one PDF per URL, with cookie banners hidden and lazy images loaded
  • 📝 HTML to PDF: paste a full HTML document (inline CSS, web fonts, images) and get one PDF
  • 🧾 Template + data to many PDFs: one Handlebars template and a JSON array of rows gives one PDF per row. Perfect for invoices, receipts, certificates, tickets, letters and reports
  • 📐 Page layout: A4, Letter, Legal, A3, A5 or Tabloid, portrait or landscape, margins, scale, background colors
  • 🔢 Headers, footers and page numbers ("3 / 12") on every page
  • 🏷️ Your file names: invoice-{{number}}.pdf instead of random keys
  • 💸 You only pay for PDFs that are created. Broken URLs and failed documents are free. No start fee.

Use cases

  • Invoices and receipts from your shop, CRM or n8n / Make / Zapier workflow data
  • Certificates for course or event attendees, from a spreadsheet exported as JSON
  • Reports built as HTML (charts, tables) and sent as PDF attachments
  • Archiving web pages for compliance, legal evidence or research
  • Saving articles and documentation as printable PDFs

How to use it

  1. Pick what to convert: Web page URLs, an HTML document, or an HTML template with Data rows. You can mix all three in one run.
  2. Choose the page size, margins and footer.
  3. Run it. Each PDF is stored in the run's key-value store and listed in the dataset with a download link.

Example: invoices from JSON

{
"template": "<html><body style=\"font-family:Arial\"><h1>Invoice {{number}}</h1><p>Bill to: {{customer}}</p><table>{{#each items}}<tr><td>{{name}}</td><td>{{qty}} × {{formatNumber price}}</td><td>{{formatNumber (multiply qty price)}}</td></tr>{{/each}}</table><h3>Total: {{formatNumber (sumProduct items \"qty\" \"price\")}} USD</h3></body></html>",
"data": [
{ "number": "INV-001", "customer": "Acme Ltd", "items": [{ "name": "Design", "qty": 2, "price": 150 }, { "name": "Hosting", "qty": 12, "price": 9.5 }] },
{ "number": "INV-002", "customer": "Globex", "items": [{ "name": "Audit", "qty": 1, "price": 900 }] }
],
"fileNameTemplate": "invoice-{{number}}",
"pageFormat": "A4",
"pageNumbers": true
}

This gives invoice-INV-001.pdf and invoice-INV-002.pdf.

Template language: Handlebars. {{field}} is HTML-escaped, {{{field}}} inserts raw HTML, {{#each list}}…{{/each}} loops, {{#if field}}…{{/if}} tests. Extra helpers: multiply, add, sum list "field", sumProduct list "qty" "price", formatNumber value 2, uppercase, date, eq. {{_index}} is the row number (1, 2, 3…).

Example: web pages with page numbers

{ "urls": [{ "url": "https://en.wikipedia.org/wiki/PDF" }, { "url": "https://example.com" }], "pageFormat": "Letter", "pageNumbers": true }

Input

FieldDefaultNotes
Web page URLsPublic http(s) pages, one PDF each
HTML document / File nameOne PDF from your HTML
HTML template / Data rows / File name templateOne PDF per data row
Page sizeA4A4, Letter, Legal, A3, A5, Tabloid
LandscapeOff
Margins10 mmCSS style: 10mm, 10mm 15mm, 1in 0.5in 1in 0.5in. 18 mm top/bottom when a header or footer is on
Print backgroundsOn
Scale10.1 to 2
Page numbersOffAdds "3 / 12" at the bottom
Header HTML / Footer HTMLUse <span class="pageNumber">, totalPages, date, title, url. Give it a font-size
CSS mediaPrintPrint = like the browser's Save as PDF. Screen = like the page looks on screen
Hide cookie bannersOnFor URLs
Hide these elementsCSS selectors, e.g. .chat-widget
Wait until / Wait for selector / Extra delayPage loadedFor slow or script-heavy pages
Timeout per document45 s
Parallel documents4
Max documents10,000

Output

Every PDF is saved in the run's key-value store under its file name. The dataset has one row per document:

{
"source": "template",
"url": null,
"rowIndex": 0,
"fileName": "invoice-INV-001.pdf",
"status": "ok",
"pdfUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/invoice-INV-001.pdf",
"pages": 1,
"bytes": 18121,
"title": null,
"httpStatus": null,
"finalUrl": null,
"error": null,
"durationSecs": 0.1,
"createdAt": "2026-11-13T12:46:10.512Z"
}

Failed documents have status: "failed" and an error, for example The page answered HTTP 404.

Pricing

$3 per 1,000 PDFs ($0.003 each), whatever the page count. No start fee. Failed documents are free. Apify's free plan credit covers about 1,600 PDFs a month.

You makeYou pay
100 invoices$0.30
1,000 web page PDFs$3.00
10,000 certificates$30.00

Use it from the API, n8n, Make or Zapier

Call the actor with the Apify API or the Apify app in n8n, Make or Zapier, then read the dataset for the pdfUrl links.

curl -X POST "https://api.apify.com/v2/acts/blueberry_rainstorm~html-to-pdf/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello PDF</h1>", "fileName": "hello"}'

FAQ

Can I use my own fonts? Yes. Load them in your HTML with @font-face or a Google Fonts <link>. The actor waits for fonts before printing.

Why does my page look different from the screen? Many sites have print styles. Set CSS media to Screen to get what you see in the browser.

My header or footer is tiny or missing. Chrome prints header and footer HTML at a very small default size: set font-size (e.g. 9px) in your template, and keep top/bottom margins at 12 mm or more.

Can it open pages behind a login? No. It converts public pages and the HTML you send.

Can my HTML read local files? No. file: URLs are blocked inside documents.

How long are the PDFs kept? In the run's key-value store, for as long as your Apify plan keeps run storage. Download them or copy them to your own storage if you need them longer.

Acceptable use

Convert only pages and content you have the right to copy. Don't use this tool to copy paywalled or copyrighted material for redistribution. You are responsible for the documents you create.

More from Pandapi 🐼

Pandapi makes friendly, no-nonsense data tools: simple input, clean output, and fair pay-per-result prices. Found a bug or need a feature? Open an issue on the Issues tab and we answer fast.