Universal Web Printer avatar

Universal Web Printer

Pricing

from $7.00 / 1,000 renders

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 $7.00 / 1,000 renders

Rating

0.0

(0)

Developer

Richard Feng

Richard Feng

Maintained by Community

Actor stats

3

Bookmarked

53

Total users

8

Monthly active users

15 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"
}
}

๐Ÿ’ณ Pricing

This Actor uses pay per event โ€” you pay for the operations you actually use, not for compute time. A plain URL-to-PDF job only triggers Render.

EventPriceWhen it fires
Render$0.0070Once per page rendered to PDF/PNG/JPEG/WebP
Watermark$0.0020Only if you enable watermarking
PDF encryption$0.0030Only if you set a password
PDF merge$0.0100Once per merged output document
Actor start$0.00005Once per run

What the free plan gets you: Apify's free plan includes $5 of platform credit every month, which is about 710 plain renders per month at no cost. 1,000 renders cost $7; adding watermarks to all of them adds $2.

You are never charged for pages that fail to render. Set Max total charge on the run to cap spend.


๐Ÿค– Use with AI agents

This Actor is callable as a tool by any MCP-capable agent โ€” Claude, Cursor, VS Code โ€” or by your own code, with no wrapper and nothing extra to deploy.

Connect over MCP

https://mcp.apify.com?tools=autofacts/universal-web-printer

In a client that reads an mcpServers configuration block:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=autofacts/universal-web-printer",
"headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
}
}
}

The agent reads this Actor's parameters and their descriptions straight from the input schema, and the hosted server infers the result field types from the dataset schema โ€” so a model knows what to send and what comes back before it ever calls anything.

Or call the API directly

curl -X POST "https://api.apify.com/v2/acts/autofacts~universal-web-printer/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"startUrls": [{"url": "https://apify.com/store"}]}'

The response body is the dataset records described above.

๐Ÿงฐ Other Actors by autofacts

Apify only auto-recommends Actors in the same category, so here are the ones that actually pair with this scraper:

ActorWhat it's for
Schema Markup Scraper & SEO AuditorExtract structured data and run a 0โ€“100 SEO audit on the same URL
YouTube Subtitle & Transcript ScraperCaptions as JSON, SRT, VTT or LLM-ready text
Shopify ScraperProduct, variant and collection data from any Shopify store

All of them: apify.com/autofacts