HTML to PDF Converter - Convert a URL or HTML string to PDF
Pricing
from $2.00 / 1,000 pdf generateds
HTML to PDF Converter - Convert a URL or HTML string to PDF
Renders a URL or a raw HTML string you provide into a PDF file using a real headless Chrome, and returns a download link. No login, no third-party API, no data beyond what you send.
Pricing
from $2.00 / 1,000 pdf generateds
Rating
0.0
(0)
Developer
Cuantic Data
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
HTML to PDF Converter — Convert a URL or HTML string to PDF
Converts a public URL or raw HTML into a PDF using a real headless Chrome (not an approximate renderer). No third-party API keys, no login.
What it does
- Accepts a URL (navigates to it and exports the page as rendered) or raw HTML (renders it directly) — one or the other, not both.
- Returns the PDF as a downloadable file (
pdfUrl) plus metadata (size, page format, orientation). - Supports page size (
A4/Letter/Legal), landscape orientation, and whether to print CSS backgrounds/colors.
Who it's for
- Generating reports, invoices or receipts as PDF from HTML built by another system (e.g. a backend that builds the HTML and needs the final PDF).
- Saving a PDF copy of a public page (e.g. terms and conditions, an article) with the real layout, not plain text.
Input
| Field | Type | Required | Description |
|---|---|---|---|
url | string | One of the two | Public http(s) URL to convert. Takes precedence over html if both are present. |
html | string | One of the two | Raw HTML to convert (max 5 MB). Pre-filled with a sample document (so the actor's daily automated test always has input to run); ignored automatically if url is also filled in. |
format | string | No (default A4) | A4, Letter or Legal. |
landscape | boolean | No (default false) | Landscape orientation. |
printBackground | boolean | No (default true) | Print CSS backgrounds and colors. |
Precedence: you need url OR html. If you send only one, that one is
used. If you send both (for example because you filled in url but left the
html field's sample prefill in place), url wins and html is silently
ignored — except a WARN is logged and the output/RUN-SUMMARY include
ignoredHtml: true so it's traceable. The run only fails if neither
field is provided.
{ "url": "https://example.com" }
or
{ "html": "<h1>Report</h1><p>Content</p>", "landscape": true }
Output
{"source": "url","url": "https://example.com","ignoredHtml": false,"format": "A4","landscape": false,"printBackground": true,"sizeBytes": 35496,"pdfUrl": "https://api.apify.com/v2/key-value-stores/<storeId>/records/OUTPUT.pdf","generatedAt": "2026-09-20T03:39:59.236Z"}
ignoredHtml is true only when both url and html were sent and html
was discarded in favor of url (see Precedence above).
The PDF file is stored in the run's Key-Value Store; pdfUrl is the direct
download link (public, as long as storage hasn't expired per the account's
plan).
Pricing
Pay-per-event, provisional. Starting reference: USD 0.01 per document
generated (03-plan.md §2).
How to call it
curl "https://api.apify.com/v2/acts/cuantic-data~html-to-pdf-converter/run-sync-get-dataset-items?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"url": "https://example.com"}'
Terms and limits
See ./TERMS.md: uses real Chrome via Puppeteer (Apache License 2.0), rendering only the content the user supplies.
FAQ
Can I send both url and html, in case one fails?
You can, but it won't try both: if both are provided, url is used and
html is ignored (with a warning in the log and ignoredHtml: true in the
output). It's not a way to get a fallback — just send the one you want
converted.
Found a bug?
Email cuanticwindows@gmail.com — we reply within 72 hours.
See build/README.md for how to run tests and publish this Actor.