Web2PDF
Pricing
from $10.00 / 1,000 results
Web2PDF
Convert any web page into a polished, high-quality PDF. This actor takes one or more URLs, renders them (including JavaScript-heavy pages), and exports them into clean, printable PDFs with consistent layout and typography.
Pricing
from $10.00 / 1,000 results
Rating
0.0
(0)
Developer
Jamshaid Arif
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
π Web to PDF β Apify Actor
Convert any web page into a polished, high-quality PDF.
This actor takes one or more URLs, renders them (including JavaScript-heavy pages), and exports them into clean, printable PDFs with consistent layout and typography.
β¨ Features
-
π§Ύ Clean PDF Layout
- A4 format
- Cover page (title + domain)
- Page numbers and running headers
-
π§ Smart Content Handling
- Detects structured pages (e.g. conversations, articles)
- Preserves headings, paragraphs, tables, and code blocks
-
π Works with Any Website
- Supports static HTML and modern JS-heavy (SPA) websites
-
π₯οΈ Headless Browser Rendering
- Uses Playwright (Chromium) for accurate page rendering
- Automatically enabled for dynamic websites
- Can be forced via input option
-
π€ Self-contained Typography
- Fonts included in build:
- Inter
- Source Serif 4
- JetBrains Mono
- KaTeX support for math rendering
- Fully offline and deterministic output
- Fonts included in build:
π₯ Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
urls | array | β Yes | β | List of URLs to convert |
forceBrowser | boolean | β No | false | Force rendering with headless browser |
filenameTemplate | string | β No | {title} | Output filename template |
Example Input
{"urls": [{ "url": "https://example.com" },{ "url": "https://en.wikipedia.org/wiki/PDF" }],"forceBrowser": false,"filenameTemplate": "{title}_{domain}"}
π€ Output
Each generated PDF is:
- Stored in the default key-value store
- Logged in the default dataset
Example Output
{"url": "https://example.com","title": "Example Domain","kind": "web","key": "Example_Domain.pdf","sizeKb": 412,"pdfUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/Example_Domain.pdf"}
π§© Filename Template
You can customize output file names using:
{title}β Page title{domain}β Website domain
Example
"{title}_{domain}"
Output:
Example_Domain_example.com.pdf
βοΈ How It Works
- Loads each URL
- Detects if JavaScript rendering is needed
- Renders page using Chromium (if required)
- Extracts structured content
- Applies clean PDF layout
- Generates and stores PDF
π Use Cases
- Save articles for offline reading
- Archive web pages
- Convert documentation into PDFs
- Generate printable reports
- Export structured web content