HTML to PDF Converter: URL to PDF & Website to PDF avatar

HTML to PDF Converter: URL to PDF & Website to PDF

Pricing

$5.00 / 1,000 pdf rendereds

Go to Apify Store
HTML to PDF Converter: URL to PDF & Website to PDF

HTML to PDF Converter: URL to PDF & Website to PDF

HTML to PDF and URL to PDF converter: turn a website, webpage or raw HTML into a PDF with headless Chrome. For invoices, receipts, reports and page archives. A4 or Letter, margins, page numbers, wait for selector, print or screen CSS. Private IPs blocked. $0.005 per PDF.

Pricing

$5.00 / 1,000 pdf rendereds

Rating

0.0

(0)

Developer

Ferrolark

Ferrolark

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Features

Limited permissions

Share

HTML to PDF & URL to PDF API (Headless Chrome)

Print web pages or your own HTML to PDF with headless Chromium, the same engine as Chrome's "Save as PDF".

  • URLs or raw HTML (also base64 HTML files from n8n or Make), up to 20 documents per run.
  • Page setup: A4, Letter, Legal, A3, A5 or Tabloid, landscape, margins, scale, page ranges and "page / total" numbers in the footer.
  • Loading control: wait for network idle, a CSS selector or an extra delay; print or screen CSS; JavaScript on or off.
  • Safe: every browser request goes through a guard that blocks private and local addresses, and the counts are in each row.
  • Manifest: pages, bytes, page title, final URL and HTTP status.

Typical uses: invoices and receipts from HTML templates, archiving pages for compliance, reports from dashboards, and PDFs generated by AI agents from HTML.

Real example

Two web pages and a small HTML invoice with page numbers:

{
"urls": [
"https://example.com/",
"https://en.wikipedia.org/wiki/PDF"
],
"html": "<h1>Invoice 42</h1><p>Total: 10 EUR</p>",
"pageNumbers": true
}
  • Run time: 18.8 s on Apify at 1,024 MB (most of it is starting Chromium).
  • Platform usage: $0.0014.
  • Your cost: 3 PDFs × $0.005 = $0.015.
OutputSourcePagesBytesRender time
example-com.pdfexample.com149,6090.6 s
en-wikipedia-org-wiki-PDF.pdfWikipedia24480,4160.9 s
document.pdfHTML114,1700.5 s

Price and limits

  • $0.005 per PDF rendered.
  • Pages that fail (HTTP 4xx/5xx, timeouts, private addresses) are listed in OUTPUT.errors and not charged.
  • Limits: 20 documents per run, 5 MB of HTML each, 50 MB per PDF, 120 s timeout per page.

Input

FieldDefaultWhat it does
urlsnonePublic pages to print.
htmlnoneRaw HTML. Use absolute URLs for images and CSS.
filesnone[{"base64": "...", "name": "invoice.html"}].
paperFormat, landscape, marginMm, scaleA4, false, 10, 1Page setup.
pageNumbersfalseFooter with page / total.
pageRangesallFor example 1-3.
waitUntilnetworkidlenetworkidle, load or domcontentloaded.
waitForSelector, delayMsnone, 0Wait for dynamic content.
mediaprintprint or screen CSS.
javascripttrueTurn off for static HTML.
viewportWidth1280For responsive layouts.
createShareableUrlfalseAlso return signed links that work without an Apify token.

Call it from code, n8n or an AI agent

API (synchronous):

curl -X POST "https://api.apify.com/v2/acts/ferrolark~html-to-pdf/run-sync-get-dataset-items?maxTotalChargeUsd=0.1" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
-d '{"urls": ["https://example.com/"], "paperFormat": "Letter"}'

n8n: paste this workflow on the canvas (Ctrl+V). Add a Header Auth credential with the name Authorization and the value Bearer <your Apify token>, and use it in both HTTP nodes. The second node downloads the PDF as an n8n binary.

{
"name": "Ferrolark html-to-pdf",
"nodes": [
{
"parameters": {},
"name": "When clicking Test workflow",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
0,
0
]
},
{
"parameters": {
"method": "POST",
"url": "https://api.apify.com/v2/acts/ferrolark~html-to-pdf/run-sync-get-dataset-items?maxTotalChargeUsd=0.05",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"html\": \"<h1>Invoice 42</h1><p>Total: 10 EUR</p>\", \"pageNumbers\": true}",
"options": {
"timeout": 300000
}
},
"name": "Run Actor",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
220,
0
]
},
{
"parameters": {
"url": "={{ $json.downloadUrl }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"name": "Download file",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
440,
0
]
}
],
"connections": {
"When clicking Test workflow": {
"main": [
[
{
"node": "Run Actor",
"type": "main",
"index": 0
}
]
]
},
"Run Actor": {
"main": [
[
{
"node": "Download file",
"type": "main",
"index": 0
}
]
]
}
}
}

AI agents (MCP): add the Apify MCP server (https://mcp.apify.com) to Claude, Cursor or any MCP client and allow ferrolark/html-to-pdf. The agent gets a typed tool with the input above.

FAQ

Can it log in or pass cookie banners?

No. It prints public pages as an anonymous visitor. For your own pages, render the HTML yourself and send it in html.

Why are fonts different from my browser?

The container has common open fonts (DejaVu, Liberation, Noto). Use web fonts in your HTML for exact branding.

Is it the same as Apify's free HTML to PDF?

It adds base64 input, page numbers, a request guard, per-document errors that are not charged and a manifest for automations.

More Ferrolark tools

  • Brand Name Availability Checker: domains, GitHub, npm, PyPI and more in one report.
  • Domain Intelligence Report: WHOIS, DNS, email security, SSL and hosting for any domain.
  • Launch Asset Pack: favicons, PWA icons, OG image and head tags from one logo.
  • Live Deploy QA: meta tags, canonical, robots, OG image and favicon of your deployed routes, with diffs between deploys.
  • Sitemap Delta: new, removed and broken URLs in any sitemap since the last run.
  • RSS Delta: only new RSS, Atom and JSON Feed items, de-duplicated.
  • PDF Merge API: merge PDFs from URLs or base64 with page ranges and a SHA-256 manifest.
  • PDF Split API: split a PDF by page ranges or every N pages, or extract pages, with a ZIP and manifest.
  • Image Convert: PNG, JPG, WebP, AVIF and HEIC conversion (SVG input too) from URLs or base64.
  • Image Compress & Resize: resize images and compress them to a target size in KB, WebP or AVIF.
  • PDF to Image: PDF pages to PNG, JPG or WebP at the DPI you choose.
  • Image to PDF: JPG, PNG, HEIC and WebP images to one PDF, JPEGs embedded without recompression.
  • PDF Compress: smaller PDFs, lossless or with image downsampling; charged only when smaller.
  • Markdown to PDF: Markdown with tables, code and footnotes to a clean PDF.
  • DOCX to PDF: Word, Excel, PowerPoint and ODT to PDF with LibreOffice.
  • Data Convert: CSV, JSON, NDJSON and Excel XLSX in any direction.

Built by Ferrolark.