How to Convert HTML to PDF in n8n in Under 2 Minutes (Free, 2025 Guide)

Learn how to quickly convert HTML to PDF using n8n with this step-by-step tutorial. Ask for custom automations in the comments, and I will create a video for you. Includes sample code for implementation.

How to Convert HTML to PDF in n8n in Under 2 Minutes (Free, 2025 Guide)
Thomas van Rossum
2.5K views β€’ Aug 13, 2025
How to Convert HTML to PDF in n8n in Under 2 Minutes (Free, 2025 Guide)

About this video

ASK ME FOR ANY AUTOMATION YOU WANT IN THE COMMENTS, I WILL BUILD IT FOR YOU IN A VIDEO!!!

Code used:
const html = $json.htmlOutput;
await $page.setContent(html, { waitUntil: 'networkidle0' });

const pdfArray = await $page.pdf({
format: 'A4',
printBackground: true
});

const pdfBuffer = Buffer.from(pdfArray);
const pdfBase64 = pdfBuffer.toString('base64');
return [{ json: { pdfBase64 } }];



Note: Replace jsonoutput with your actual input!

Want to start using Puppeteer and create PDFs in two minutes?

This installs quickly and sets up everything you need automatically, with no hassle or complicated steps.

Whether you’re a developer, automation enthusiast, or no-code user, Puppeteer gives you powerful browser automation right away.

Get started and boost your productivity instantly.

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

2.5K

Likes

32

Duration

1:14

Published

Aug 13, 2025

User Reviews

4.4
(2)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.