Package Information
Downloads: 6 weekly / 44 monthly
Latest Version: 0.1.1
Available Nodes
Documentation
n8n-nodes-convert-to-pdf
An n8n community node that converts HTML and CSV content to PDF files. Works in any Node.js environment — no Chrome or browser dependencies required.
Installation
Community Edition
- Go to Settings > Community Nodes
- Click Install a community node
- Enter
n8n-nodes-convert-to-pdf - Click Install
Self-hosted / Kubernetes
If you are running n8n on Kubernetes (e.g. EKS), the community node must be available on all pods (main, workers, webhooks). The recommended approach is to bake it into a custom Docker image:
FROM n8nio/n8n:latest
USER root
RUN cd /usr/local/lib/node_modules/n8n && npm install n8n-nodes-convert-to-pdf
USER node
Operations
HTML to PDF
Converts HTML content to a PDF document. Supports headings, paragraphs, bold, italic, lists, tables, and horizontal rules.
| Field | Description |
|---|---|
| HTML Source | Choose between Text Input (paste HTML directly) or Binary Input (read from an incoming file) |
| HTML Content | The HTML string to convert (when using Text Input) |
| Input Binary Field | The binary field name containing the HTML file (when using Binary Input) |
CSV to PDF
Converts CSV content to a styled PDF table with headers, alternating row colors, and borders.
| Field | Description |
|---|---|
| CSV Source | Choose between Text Input (paste CSV directly) or Binary Input (read from an incoming file) |
| CSV Content | The CSV string to convert (when using Text Input) |
| Input Binary Field | The binary field name containing the CSV file (when using Binary Input) |
Shared Options
These options are available for both operations:
| Option | Description | Default |
|---|---|---|
| Output Binary Field | Name of the output binary field | data |
| File Name | File name for the generated PDF | output.pdf |
PDF Options
| Option | Description | Default |
|---|---|---|
| Format | Paper size (A3, A4, A5, Letter, Legal, Tabloid) | A4 |
| Landscape | Use landscape orientation | false |
| Margin Top | Top margin (e.g. 10mm, 1in, 1cm) | 10mm |
| Margin Bottom | Bottom margin | 10mm |
| Margin Left | Left margin | 10mm |
| Margin Right | Right margin | 10mm |
Example Usage
HTML to PDF
- Add a Convert to PDF node to your workflow
- Select HTML to PDF as the operation
- Enter your HTML content:
<h1>Invoice #1234</h1> <p>Date: 2026-01-15</p> <table> <thead><tr><th>Item</th><th>Qty</th><th>Price</th></tr></thead> <tbody> <tr><td>Widget</td><td>10</td><td>$5.00</td></tr> <tr><td>Gadget</td><td>3</td><td>$12.50</td></tr> </tbody> </table> - The node outputs a PDF binary that can be saved, emailed, or passed to other nodes
CSV to PDF
- Add a Convert to PDF node to your workflow
- Select CSV to PDF as the operation
- Enter your CSV content:
name,email,department Alice,alice@example.com,Engineering Bob,bob@example.com,Marketing Carol,carol@example.com,Sales - The node outputs a PDF with a formatted table
Supported HTML Elements
| Element | Rendering |
|---|---|
<h1> - <h6> |
Headings with scaled font sizes |
<p> |
Paragraphs with spacing |
<strong>, <b> |
Bold text |
<em>, <i> |
Italic text |
<ul>, <ol> |
Bulleted and numbered lists |
<table> |
Tables with headers, borders, and alternating row colors |
<hr> |
Horizontal rule |
<br> |
Line break |
<div>, <section>, <article> |
Block containers |
<span> |
Inline container |
License
MIT