VOOZH about

URL: https://apify.com/exciting_perfume/html-to-pdf-apify-actor

โ‡ฑ HTML To PDF for N8N [DEPRECATED] ยท Apify


๐Ÿ‘ HTML To PDF for N8N avatar

HTML To PDF for N8N

Deprecated

Pricing

from $10.00 / 1,000 results

Go to Apify Store

HTML To PDF for N8N

Deprecated

Generate accurate PDFs from HTML or URLs using Chromium. Supports CSS, fonts, and backgrounds. Automation-ready and perfect for n8n workflows, reports, invoices, and contracts.

Pricing

from $10.00 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ Gavin Campbell

Gavin Campbell

Maintained by Community

Actor stats

1

Bookmarked

20

Total users

5

Monthly active users

5 months ago

Last modified

Share

HTML to PDF Converter for n8n & API

This Apify Actor is a high-performance microservice that converts HTML or URLs into PDF files. It is optimized for automation workflows (n8n, Make, Zapier) by returning a direct download link to the generated PDF.

๐Ÿš€ Quick Start for n8n

You can easily use this Actor within n8n to generate invoices, reports, or web captures.

Step 1: Trigger the Actor

Use the Apify node in n8n:

  • Resource: Actor
  • Operation: Run
  • Actor: html-to-pdf (or copy the Actor ID if running a custom build)
  • Input: JSON (see examples below)

Step 2: Download the PDF

The Actor outputs a dataset containing a pdfUrl field. Use an HTTP Request node to download the file:

  • Method: GET
  • URL: {{ $json["pdfUrl"] }}
  • Authentication: Generic Credential Type -> Query Auth
    • Name: token
    • Value: (Your Apify API Token)

๐Ÿ“ก API Usage & Input Examples

When calling this Actor via the Apify API (POST /acts/[ACTOR_ID]/run-sync-get-dataset-items), pass these JSON bodies:

Option A: Convert a Website URL

Best for capturing reports, articles, or dashboards.

{
"url":"https://admindone.com",
"pdfFormat":"A4",
"landscape":true,
"printBackground":true,
"waitUntil":"networkidle",
"fileName":"admindone_report.pdf"
}

Option B: Convert Raw HTML (e.g., Invoices)

Best for generating dynamic documents from your own data.

{
"html":"<html><body><h1>Invoice #99</h1><p>Total: $100.00</p></body></html>",
"pdfFormat":"Letter",
"marginTop":"20mm",
"marginRight":"20mm",
"marginBottom":"20mm",
"marginLeft":"20mm",
"allowExternalRequests":false
}

๐Ÿ“ฆ Output Format

The Actor produces a structured JSON output in the default Dataset.

Example Response:

[
{
"inputType":"url",
"target":"https://admindone.com",
"pdfUrl":"https://api.apify.com/v2/key-value-stores/mI5f8.../records/OUTPUT.pdf",
"fileName":"document.pdf",
"pdfBytes":45032,
"timing":{
"totalMs":2300,
"renderMs":1500,
"pdfMs":600
},
"optionsUsed":{ ... },
"timestamp":"2023-10-27T10:00:00.000Z"
}
]
  • pdfUrl: The direct link to your generated PDF. (Note: Requires your API token to access).
  • pdfBytes: File size in bytes.

โš™๏ธ Configuration Options

OptionTypeDefaultDescription
htmlString-Raw HTML string to render.
urlString-Public URL to render.
pdfFormatStringA4Page size (Letter, A4, A3, etc.)
landscapeBooleanfalseLandscape orientation.
printBackgroundBooleantrueInclude background graphics/colors.
scaleNumber1Zoom level (0.1 to 2).
marginTopString10mmTop margin (units: mm, cm, px).
waitUntilStringnetworkidleWhen to consider navigation finished (load, domcontentloaded, networkidle).
allowExternalRequestsBooleanfalse(HTML only) Allow loading images/scripts from the web.

๐Ÿ›  Troubleshooting

  • Blank PDF? If the site uses heavy JavaScript (React/Vue), change waitUntil to networkidle and increase timeoutSecs.
  • Images missing in HTML? If you use <img src="https://...">, you must set allowExternalRequests: true.
  • Access Denied on pdfUrl? Ensure you append ?token=YOUR_APIFY_TOKEN to the URL when fetching it outside of the Apify Console.

You might also like

Web Page to Single-Page PDF & HTML (Automation-Ready)

exciting_perfume/Web-Page-to-Single-Page-PDF-and-HTML

Convert webpages to single-page PDFs and extract raw HTML via API. Captures full scroll height (no A4 splits). Built for automation with n8n, Make, and Zapier. Ideal for archiving, AI workflows, compliance, and bulk processing.

๐Ÿ‘ User avatar

Gavin Campbell

9

Universal Document Format Transformer

actorify/universal-document-format-transformer

Universal Document Format Transformer: a cloud-based Apify Actor that converts documents (PDF, DOCX, PPTX, HTML, TXT) into Markdown, JSON, CSV, HTML or TXT using Pandoc. Easy REST API for automations (n8n, Zapier, Make), production-ready error handling, and security controls.

SmartSchema Extract โ€” Text to JSON with AI

olican/smartschema-extract

Convert any unstructured text into validated JSON using Google Gemini. Define your JSON Schema per request. Perfect for invoice parsing, web scraping, email extraction, and ETL pipelines.

1

5.0

(2)

๐ŸŒ Bulk WHOIS Lookup โ€” Domain Intelligence

nexgendata/domain-whois-lookup

Bulk WHOIS lookups for any domain. Registrar, creation date, expiry, nameservers & registrant info. Find expiring domains, build portfolios & research competitors. Pay per lookup.

Fast Pdf Processor

contemporary_fruit/pdf-processor-actor

This API is a PDF Processing Service allowing users to upload a PDF to: Extract Text: Reads all text from the PDF and returns it as structured JSON data per page. Merge Pages: Creates a new PDF containing only the specific pages selected by the user. (260 characters)

SEC EDGAR Scraper โ€” 10-K, 10-Q & 8-K Filings

devilscrapes/sec-edgar-filings-scraper

Search SEC EDGAR (US public company filings) by company ticker, CIK, or form type via the free EDGAR API โ€” each filing's CIK, form type, period, filing date, accession number, and primary-document URL โ€” export to JSON or CSV dataset. Built on SEC's full-text search.

Federal Register Scraper | Daily US Rulemaking Notices

parseforge/federalregister-scraper

Extract structured data from the US Federal Register: rules, proposed rules, notices, and presidential documents. Filter by agency, document type, and publication date. Ideal for compliance teams, policy analysts, and legal researchers tracking US regulations.

๐ŸŽญ Playwright MCP โ€” AI Browser Automation

nexgendata/playwright-mcp-server

MCP server for AI agents to control browsers via Playwright โ€” navigate, click, type, screenshot & extract data. Give Claude or GPT web browsing abilities. 16 tools for browser automation.

23

5.0

(1)

Booking Scraper Pro

webdatalabs/booking-scraper-pro

Extract hotel data, guest reviews, and sentiment insights from Booking.com. Search any destination, get comprehensive hotel information including ratings, facilities, photos, and analyze review sentiment