Back to Nodes

Html To Pdf Free

Last updated Oct 21, 2025

Free n8n node for converting HTML to PDF with automatic browser setup

10 Weekly Downloads
75 Monthly Downloads

Description

n8n-nodes-html-to-pdf-free

This n8n node allows you to convert HTML content into PDF documents without requiring any external paid APIs. It uses Puppeteer with automatic Chromium management for reliable PDF generation.

Installation

Follow the installation guide in the n8n community nodes documentation.

Usage Instructions

1. First Time Setup:
– Add the HTML to PDF node to your workflow
– Select “Check Chrome Status” operation
– Execute the node to verify Chrome installation
– If the status is not_ready, run the “Install Chrome Dependencies” operation to trigger the bundled installer
– Follow the provided instructions if Chrome is still not found afterwards

2. Converting HTML to PDF:
– Select “Convert HTML to PDF” operation
– Configure your HTML source and PDF settings
– Execute the node

Chrome/Chromium Setup

Version 0.5.0: Adds inline “Install Chrome Dependencies” operation with actionable guidance.

Version 0.3.0: Improved Chrome detection and automatic installation.

The node will automatically try to:
1. Use Puppeteer’s bundled Chrome (if available)
2. Find system-installed Chrome/Chromium
3. Guide you through installation if Chrome is not found

#### Quick Chrome Installation

After installing the node, if you encounter Chrome-related errors:

  • Run the node with the Install Chrome Dependencies operation (recommended)
  • Run the included installation script

    npm run install-chrome

    OR manually install Chrome

    npx puppeteer browsers install chrome

    #### Platform-Specific Installation

    Docker/Alpine Linux:

    ⚠️ For Docker users: See n8n is a fair-code licensed workflow automation platform.

    Installation
    Operations
    Credentials
    Compatibility
    Usage
    Resources

    Installation

    Follow the installation guide in the n8n community nodes documentation.

    Manual installation

    To manually install this node:

    1. Install the node package in your n8n installation:

       npm install n8n-nodes-html-to-pdf
       

    2. Restart n8n

    Operations

    This node supports the following operations:

  • Convert HTML to PDF: Convert HTML content or HTML from a URL into a PDF document
  • Check Chrome Status: Verify whether Chrome/Chromium is reachable from your n8n runtime
  • Install Chrome Dependencies: Run the bundled installer and re-check the environment with actionable logs
  • Credentials

    This node does not require any credentials.

    Compatibility

  • n8n Version: Requires n8n version 0.170.0 or later
  • Node.js: Requires Node.js version 20 or later
  • Usage

    Basic HTML to PDF conversion

    1. Add the HTML to PDF node to your workflow
    2. Configure the node:
    – HTML Source: Choose between “From Input Field” or “Direct HTML”
    – HTML Content: Enter your HTML content or reference a field from previous nodes
    – Filename: Set the output PDF filename
    – Page Format: Choose from A4, Letter, Legal, etc.
    – Orientation: Portrait or Landscape
    – Margins: Set page margins in mm

    Example workflow

    Here’s a simple example that converts HTML to PDF:

    1. Start node
    2. Set node with HTML content
    3. HTML to PDF node to convert the HTML
    4. Write Binary File node to save the PDF

    The node outputs:

  • A binary file containing the PDF
  • JSON data with metadata about the conversion
  • Troubleshooting

    Error: “Failed to launch the browser process”

    This error occurs when Chromium is not installed on your server. See the Prerequisites section above for installation instructions.

    For n8n Cloud users

    Unfortunately, this node may not work on n8n Cloud as it requires system-level Chromium installation. Consider using n8n self-hosted with proper Chromium setup.

    Docker-specific setup

    If you’re using Docker, you might need to add these environment variables:

    ENV PUPPETEERSKIPCHROMIUM_DOWNLOAD=true
    ENV PUPPETEEREXECUTABLEPATH=/usr/bin/chromium-browser
    

    Resources

  • n8n community nodes documentation
  • GitHub repository
  • Changelog

    v0.5.0

  • Feature: Added “Install Chrome Dependencies” operation to attempt automated Chromium setup from inside the node
  • Improvement: Clearer status responses with actionable next steps and documentation links
  • Improvement: Conversion operation now blocks early when Chrome is unavailable, avoiding cryptic Puppeteer errors
  • v0.4.0

  • New Feature: Added “Check Chrome Status” operation to verify Chrome installation within n8n
  • Improvement: Split operations – users can now check Chrome status before attempting conversion
  • UI Enhancement: Clear status messages and installation instructions shown directly in n8n
  • Better UX: All conversion-related fields now only show when “Convert HTML to PDF” operation is selected
  • v0.3.0

  • Major Fix: Completely revamped Chrome/Chromium detection and installation
  • Feature: Added automatic Chrome path detection for system-installed browsers
  • Feature: Added install-chrome script for easy Chrome installation
  • Improvement: Better fallback mechanisms when Puppeteer’s Chrome is not available
  • Improvement: More comprehensive error messages with platform-specific instructions
  • Improvement: Support for various Chrome installation paths across different platforms
  • v0.2.1

  • Fix: Added postinstall script to ensure Chrome browser is downloaded
  • Improvement: Enhanced error messages with specific instructions for Chrome installation
  • Documentation: Added troubleshooting section for Chrome download issues
  • v0.2.0

  • Breaking Change: Migrated from html-pdf-node to puppeteer for better Chromium management
  • Feature: Automatic Chromium download – no manual installation required in most cases
  • Fix: Resolved “Failed to launch browser process” errors on production servers
  • Improvement: Better error messages when Chromium is not available
  • Improvement: Added browser cleanup in finally block to prevent resource leaks
  • v0.1.0

  • Initial release
  • Convert HTML to PDF with various formatting options
  • Support for HTML content from string or URL
  • Configurable page size, orientation, and margins
  • License

    MIT

    Author

    Muhammad Faizan

  • Email: [email protected]
  • GitHub: @mfa1zan