Universal Web Printer avatar
Universal Web Printer

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Universal Web Printer

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

Autofactor

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

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 see
    • full-page - Smart Scroll technology to capture lazy-loaded content perfectly
    • selector - Extract specific DOM elements as vector-rich PDFs or images
    • readability - 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

ParameterTypeDefaultDescription
sourceTypeurl | htmlurlInput source type
startUrlsarray-URLs to render
htmlContentstring-Raw HTML to render
baseUrlstring-Base URL for relative paths
outputFormatpdf | png | jpeg | webppdfOutput file format
viewModeviewport | full-page | selector | readabilityviewportCapture mode
targetSelectorstring-CSS selector for element extraction
viewportWidthinteger1920Browser width
viewportHeightinteger1080Browser height
scaleFactorinteger2Device Scale Factor (DPR)
paperFormatA4 | A3 | Letter | Legal | TabloidA4PDF paper size
printBackgroundbooleantrueInclude backgrounds in PDF
smartScrollbooleantrueEnable lazy-load triggering
scrollDelayinteger500Wait time after scroll (ms)
waitForSelectorstring-Wait for element before capture
removeSelectorsarray[]Elements to remove
clickSelectorsarray[]Elements to click
hideFixedElementsbooleantrueHide sticky navbars
customCssstring-Custom CSS to inject
mergePdfsbooleanfalseMerge all PDFs into one
pdfPasswordstring-PDF encryption user/owner password
imageQualityinteger80Image compression (1-100)
watermarkobject-Watermark configuration (see below)

💧 Watermark Configuration

The watermark object supports the following properties:

PropertyTypeDefaultDescription
typetext | image-Watermark type
textstring-Text content (for text type)
imageUrlstring (url)-Image URL (for image type)
opacitynumber (0-1)-Opacity level
colorstring-Text color (e.g. red, #ff0000, rgba(...))
sizenumber-Font size (text) or scale % (image)
rotationnumber-Rotation in degrees
positionenum-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"
}
}