n8n-nodes-wkhtmltopdf
v1.0.0
Published
n8n node for converting HTML to PDF using wkhtmltopdf
Downloads
10
Maintainers
Readme
n8n-nodes-wkhtmltopdf
A custom n8n node for converting HTML content to PDF using wkhtmltopdf.
Features
- Convert HTML content to PDF
- Convert HTML from URL to PDF
- Multiple output formats (Base64, Binary, File Path)
- Configurable page size and orientation
- Customizable margins
- JavaScript execution support
- Custom wkhtmltopdf options
Prerequisites
This node requires wkhtmltopdf to be installed on your system. The node will automatically detect the correct path based on your operating system:
- Windows:
C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe - Linux:
/usr/bin/wkhtmltopdf - macOS:
/usr/local/bin/wkhtmltopdf
Windows
Download and install from: https://wkhtmltopdf.org/downloads.html
macOS
brew install wkhtmltopdfLinux (Ubuntu/Debian)
sudo apt-get install wkhtmltopdfLinux (CentOS/RHEL/Fedora)
sudo yum install wkhtmltopdf
# or for newer versions:
sudo dnf install wkhtmltopdfInstallation
- Clone this repository
- Install dependencies:
npm install - Build the node:
npm run build - Install in your n8n instance
Usage
- Add the "HTML to PDF" node to your workflow
- Configure the input (HTML content or URL)
- Set your preferred output format and options
- Execute the workflow
Configuration Options
- HTML Content: Direct HTML content to convert
- HTML URL: URL of a webpage to convert
- Output Format: Choose between Base64, Binary, or File Path
- Page Size: A4, A3, A5, Letter, Legal
- Orientation: Portrait or Landscape
- Margins: Top, Right, Bottom, Left margins
- Enable JavaScript: Allow JavaScript execution
- Custom Options: Additional wkhtmltopdf command-line options
License
MIT
