Universal Web Printer
Pricing
from $0.01 / 1,000 results
Go to Apify Store
Universal Web Printer
A powerful web rendering Actor that converts URLs and HTML to PDF, PNG, JPEG, or WebP. Features smart scroll-stitch for full-page captures, element-level extraction, reading mode, watermark and PDF merging.
Pricing
from $0.01 / 1,000 results
Rating
5.0
(1)
Developer

Autofactor
Maintained by Community
Actor stats
1
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
HTML to PDF/Image & Screenshot - A powerful web rendering Actor based on Crawlee and Playwright
🎯 Features
- Multi-Format Output: PDF, PNG, JPEG, WebP
- Flexible Input: URLs or raw HTML strings
- Advanced View Modes:
viewport- Capture exactly what you seefull-page- Smart Scroll technology to capture lazy-loaded content perfectlyselector- Extract specific DOM elements as vector-rich PDFs or imagesreadability- Distraction-free reading mode (Mozilla Readability integration)
- Page Manipulation:
- Remove unwanted elements (ads, cookie banners)
- Click buttons ("Load More", "I Agree")
- Inject custom CSS
- Hide fixed sticky elements
- Security & Branding:
- PDF Encryption: Password protect your documents (RC4 128-bit)
- Watermarking: Add text or image watermarks with custom positioning, royalty-free tiling, and transparency
- Enterprise-Ready: Proxy support, automatic retries, fingerprint evasion, and PDF merging
🚀 Quick Start
URL to PDF
{"sourceType": "url","startUrls": [{ "url": "https://example.com" }],"outputFormat": "pdf","viewMode": "viewport"}
HTML to Image
{"sourceType": "html","htmlContent": "<h1>Hello World</h1><p>This is a test.</p>","baseUrl": "https://example.com","outputFormat": "png","viewportWidth": 1200,"viewportHeight": 630}
Full Page Screenshot
{"sourceType": "url","startUrls": [{ "url": "https://news.ycombinator.com" }],"outputFormat": "png","viewMode": "full-page","smartScroll": true,"hideFixedElements": true}
Element Extraction
{"sourceType": "url","startUrls": [{ "url": "https://example.com" }],"outputFormat": "pdf","viewMode": "selector","targetSelector": ".invoice-container"}
📋 Input Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sourceType | url | html | url | Input source type |
startUrls | array | - | URLs to render |
htmlContent | string | - | Raw HTML to render |
baseUrl | string | - | Base URL for relative paths |
outputFormat | pdf | png | jpeg | webp | pdf | Output file format |
viewMode | viewport | full-page | selector | readability | viewport | Capture mode |
targetSelector | string | - | CSS selector for element extraction |
viewportWidth | integer | 1920 | Browser width |
viewportHeight | integer | 1080 | Browser height |
scaleFactor | integer | 2 | Device Scale Factor (DPR) |
paperFormat | A4 | A3 | Letter | Legal | Tabloid | A4 | PDF paper size |
printBackground | boolean | true | Include backgrounds in PDF |
smartScroll | boolean | true | Enable lazy-load triggering |
scrollDelay | integer | 500 | Wait time after scroll (ms) |
waitForSelector | string | - | Wait for element before capture |
removeSelectors | array | [] | Elements to remove |
clickSelectors | array | [] | Elements to click |
hideFixedElements | boolean | true | Hide sticky navbars |
customCss | string | - | Custom CSS to inject |
mergePdfs | boolean | false | Merge all PDFs into one |
pdfPassword | string | - | PDF encryption user/owner password |
imageQuality | integer | 80 | Image compression (1-100) |
watermark | object | - | Watermark configuration (see below) |
💧 Watermark Configuration
The watermark object supports the following properties:
| Property | Type | Default | Description |
|---|---|---|---|
type | text | image | - | Watermark type |
text | string | - | Text content (for text type) |
imageUrl | string (url) | - | Image URL (for image type) |
opacity | number (0-1) | - | Opacity level |
color | string | - | Text color (e.g. red, #ff0000, rgba(...)) |
size | number | - | Font size (text) or scale % (image) |
rotation | number | - | Rotation in degrees |
position | enum | - | center, top-left, top-right, bottom-left, bottom-right, tile |
📤 Output
Results are saved to Key-Value Store and metadata to Dataset:
{"url": "https://example.com","sourceType": "url","outputFormat": "pdf","viewMode": "viewport","fileName": "example_com_2025-12-10T06-30-00-000Z.pdf","fileUrl": "example_com_2025-12-10T06-30-00-000Z.pdf","fileSize": 123456,"pageCount": 2,"capturedAt": "2025-12-10T06:30:00.000Z"}
🍳 Recipes
Recipe 1: Invoice Generation
{"sourceType": "html","htmlContent": "<html>...invoice template...</html>","baseUrl": "https://yourdomain.com/assets/","outputFormat": "pdf","paperFormat": "A4","printBackground": true}
Recipe 2: News Archiving (Ad-Free)
{"sourceType": "url","startUrls": [{ "url": "https://news-site.com/article" }],"outputFormat": "pdf","viewMode": "full-page","removeSelectors": ["#cookie-banner", ".ad-container", ".newsletter-popup"],"hideFixedElements": true}
Recipe 3: Social Media Card Generator
{"sourceType": "html","htmlContent": "<div style='width:1200px;height:630px;background:linear-gradient(135deg,#667eea,#764ba2);padding:40px;color:white;'><h1>My Article Title</h1></div>","outputFormat": "png","viewportWidth": 1200,"viewportHeight": 630}
Recipe 4: Secure Document with Watermark
{"sourceType": "url","startUrls": [{ "url": "https://example.com/contract" }],"outputFormat": "pdf","watermark": {"type": "text","text": "CONFIDENTIAL","opacity": 0.3,"rotation": -45,"position": "center","color": "rgb(255, 0, 0)","size": 50},"pdfPassword": "secure-password-123"}
Recipe 5: Branded Image with Logo Tile
{"sourceType": "url","startUrls": [{ "url": "https://example.com" }],"outputFormat": "png","watermark": {"type": "image","imageUrl": "https://example.com/logo.png","opacity": 0.2,"size": 15,"position": "tile"}}