VOOZH about

URL: https://apify.com/autofacts/universal-web-printer

โ‡ฑ Universal Web Printer ยท Apify


Pricing

Pay per event

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

Pay per event

Rating

0.0

(0)

Developer

๐Ÿ‘ Richard Feng

Richard Feng

Maintained by Community

Actor stats

3

Bookmarked

31

Total users

14

Monthly active users

3 months 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"
}
}

You might also like

URL to PDF Converter

rainminer/url-to-pdf-converter

Converts any web page into a high-quality PDF document ready to download file hosted on Apify. Print any web page to PDF with this actor.

Page Printer

marco.gullo/page-printer

Performs screenshots or print web pages in PDF format.

Html To Png Actor

rmed19/html-to-png-actor

Captures PNG screenshots of webpages and converts HTML to PNG

๐Ÿ‘ User avatar

Mohammed Rhamnia

17

Screenshot & HTML file from Url

leadsbrary/screenshot-html-file-from-url

From 1$/1000 results. Capture website screenshots &/or full-page HTML in one run, from $1/1000 URLs. PNG, JPEG & PDF โ€” full-page, custom viewport, lazy-load scroll, cookie-banner hiding, batch mode. HTML files open correctly in any browser. REST API ready. No watermark.

๐Ÿ‘ User avatar

Alexandre Manguis

23

5.0

Website Screenshot & PDF API โ€” Fast Captures

george.the.developer/screenshot-pdf-api

Capture pixel-perfect screenshots and PDFs from any URL in under 3 seconds. PNG/JPEG/WebP formats, custom viewports, full-page capture, batch up to 20 URLs.

18

PDF Scraper

onidivo/pdf-scraper

Scrape and extract text from PDF links.

๐Ÿ‘ User avatar

Onidivo Technologies

512

Website Screenshot API โ€” Full-Page, Element & Device Capture

cheapapi/website-screenshot-api

Website Screenshot API: capture any URL as PNG, JPEG or WebP (PDF too) โ€” true full-page, element & region capture, 13 device profiles, dark mode, retina, ad/cookie-banner blocking, stealth, auth & geo. Self-scaling and SSRF-safe. Standby HTTP + batch.

Html To Pdf Api

simplifysme/html-to-pdf-api

๐Ÿ“„ Convert any HTML page or URL to high-quality PDF documents via API. Perfect for reports, invoices, documentation, web page archiving, and automated document generation.

๐Ÿ‘ User avatar

SimplifySME Toolbox

1

HTML To PDF API

igview-owner/html-to-pdf-api

Convert HTML content and webpage URLs to high-quality PDF documents instantly. HTML to PDF converter with customizable page formats (A4, Letter), scale control, background graphics, and smart waiting for dynamic content. Perfect for reports, documentation, and automated PDF generation workflows.

๐Ÿ‘ User avatar

Sachin Kumar Yadav

46