This is an n8n community node that converts HTML content to PDF using Puppeteer.
- Install the package in your n8n custom nodes directory:
cd ~/.n8n/custom
npm install n8n-nodes-html-to-pdf
- Restart n8n
The node accepts HTML content as input and outputs a PDF file. You can configure the following options:
- HTML Content: The HTML content to convert to PDF
- PDF Options:
- Format: Page format (A4 or Letter)
- Landscape: Whether to use landscape orientation
- Margin: Page margins in inches
- Add the "HTML to PDF" node to your workflow
- Connect it to a node that provides HTML content
- Configure the PDF options as needed
- The node will output a binary PDF file that can be saved or processed further
To develop this node:
- Clone the repository
- Install dependencies:
pnpm install
- Build the code:
pnpm build
- Link the package to your n8n installation:
cd ~/.n8n/custom
npm link /path/to/n8n-nodes-html-to-pdf