HTML to PDF Converter – URL to PDF & Raw HTML, Bulk
Pricing
from $4.00 / 1,000 pdf createds
HTML to PDF Converter – URL to PDF & Raw HTML, Bulk
Convert HTML to PDF in bulk: web page URLs, raw HTML strings (invoices, receipts, reports) and HTML files to print-quality PDFs with headless Chrome. A4/Letter, margins, header/footer page numbers, cookie banners hidden, merge into one PDF. $4 per 1,000 PDFs.
Pricing
from $4.00 / 1,000 pdf createds
Rating
0.0
(0)
Developer
Cemal Atakli
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 days ago
Last modified
Categories
Share
Convert HTML to PDF in bulk with real headless Chrome. Give it web page URLs (URL to PDF, website to PDF), raw HTML strings (invoices, receipts, reports, certificates) or links to .html files, and get print-quality PDFs with clickable links, selectable text, CSS backgrounds and web fonts. Set paper size, margins, landscape, scale, header and footer with page numbers, and optionally merge everything into one PDF.
$4 per 1,000 PDFs. Failed pages are free.
What it does
- URL to PDF: opens each page in Chromium, hides cookie/consent banners, blocks ads and trackers, loads lazy images, and prints it with the page's print stylesheet (or as seen on screen).
- HTML to PDF: renders your HTML string exactly like a browser would: CSS, flexbox/grid, Google Fonts, remote or base64 images,
@pagerules,page-break-*. AddbaseUrlso relative links resolve. - Page layout: A4, Letter, Legal, A3, A5, Tabloid or custom width × height; portrait or landscape; margins; scale 0.1–2; page ranges like
1-3,5; CSS@page sizesupport. - Header and footer templates with
pageNumber,totalPages,date,titleandurlplaceholders, e.g. "Page 2 of 7". - Wait controls:
waitUntil(load, networkidle, ...),waitForSelectorand an extra delay for charts and JavaScript-rendered pages. - Merge into one PDF in input order, and custom file names (
{index},{name},{title},{host},{date}). - Every PDF gets a public download link, its page count and size.
Use cases
- Generate invoice PDFs, receipts, quotes, tickets and certificates from HTML templates (Make, Zapier, n8n or your backend calls the API).
- Archive web pages, articles, documentation or terms of service as PDF (compliance, legal evidence, research).
- Turn reports and dashboards into printable, shareable PDFs.
- Bulk website to PDF for offline reading or for feeding PDFs into AI / RAG pipelines.
- Bundle many pages into one PDF document (e.g. a whole docs section).
Input example
{"urls": ["https://example.com", "https://en.wikipedia.org/wiki/PDF"],"htmlItems": [{ "name": "invoice-1001", "html": "<html><body><h1>INVOICE</h1><p>Total: $1,680.00</p></body></html>" },"<h1>Plain HTML strings work too</h1>",{ "name": "report", "html": "<img src='/static/images/icons/wikipedia.png'>", "baseUrl": "https://en.wikipedia.org/" }],"pageFormat": "A4","landscape": false,"margins": { "top": "10mm", "right": "10mm", "bottom": "10mm", "left": "10mm" },"printBackground": true,"footerTemplate": "<div style=\"font-size:9px;width:100%;text-align:center\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>","emulateMedia": "print","hideCookieBanners": true,"mergeIntoOnePdf": true,"fileNameTemplate": "{index}-{name}"}
Run it with no input and it converts a demo (two web pages and a sample invoice), so you can see the result in one click.
Output example
One dataset row per document (plus one merged row when merging). PDFs are stored in the run's key-value store.
{"type": "document","source": "Invoice 1001","sourceType": "html","status": "success","pageCount": 1,"sizeBytes": 52806,"pdfUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/0004-invoice-inv-1001.pdf","title": "Invoice INV-1001","fileName": "0004-invoice-inv-1001.pdf","pageFormat": "Letter","renderTimeMs": 720,"warning": null,"error": null}
Failed documents have "status": "failed" and an error message (for example DNS lookup failed, Server answered HTTP 404, waitForSelector '#chart' did not appear). They are not charged. The OUTPUT record holds a run summary with the merged PDF link.
Pricing
Pay per event: $0.004 per PDF generated, $0.002 per merged PDF (only if you turn merging on), $0.00005 per run start. No monthly fee; errors, retries and duplicates are free. You can cap a run with "Max total charge" and it stops cleanly at the limit.
| Actor (Apify Store) | Users (30 days) | Price per PDF |
|---|---|---|
| apify/html-to-pdf-converter | 9 | free (you pay platform usage) |
| rainminer/html-to-pdf-converter | 8 | $0.01 |
| automation-lab/html-to-pdf-converter | 8 | - |
| rainminer/url-to-pdf-converter | 3 | $0.015 |
| lexis-solution url-to-pdf | - | $0.025 |
| weio/website-to-pdf-bulk | - | $0.004 |
| This Actor | - | $0.004 (URLs + raw HTML, merge, header/footer) |
1,000 invoices or web pages = $3.
FAQ
Can I convert HTML that is not online? Yes. Paste it into htmlItems as a string or {name, html} object. Use baseUrl if it references relative images or CSS.
How do I add page numbers? Put <span class="pageNumber"></span> / <span class="totalPages"></span> in footerTemplate. Set a font size inline: Chromium's default template font is tiny. Images in templates must be base64 data: URIs.
Why does the PDF look different from the website? By default the page's print stylesheet is used (menus and ads are often hidden). Set emulateMedia to screen to get the on-screen look.
A chart or table is missing. Use waitForSelector (e.g. canvas) or delayMs, or set waitUntil to networkidle.
Are pages behind a login supported? No. Only public pages and HTML you provide. Pages answering 4xx/5xx are skipped for free unless you turn on convertErrorPages.
Does it accept cookies or click banners? No. Cookie banners are hidden with CSS; nothing is clicked or accepted.
Is my HTML private? It is rendered inside your own Apify run; PDFs are stored in your run's storage. Local files on the server cannot be read (file: URLs are blocked).
What about very long pages? Long pages become multi-page PDFs (e.g. a Wikipedia article = 25 A4 pages). Use pageRanges to keep only some pages, and scale to fit wide layouts.
Use with AI agents / Apify MCP
This Actor works as a tool for AI agents via the Apify MCP server (Claude, ChatGPT, Cursor, n8n, LangChain). An agent can call it with {"urls": [...]} or {"htmlItems": [{"name": "...", "html": "..."}]} and returns the pdfUrl links, e.g. "generate a PDF invoice from this HTML" or "save these 20 articles as PDFs and merge them". For synchronous use, call the run-sync-get-dataset-items API endpoint and read pdfUrl from the response.