Make.com PDF Generation: Complete Guide 2025
Learn how to automate PDF generation in Make.com with CustomJS. Step-by-step guide with templates for invoices, HTML to PDF, and page extraction. 600 free PDFs/month.
// n8n integration
All nodes are available on both n8n Cloud and self-hosted n8n and require you to install the CustomJS community package. See Installation.

The first step in your workflow is setting up a Webhook node that will receive incoming data (e.g., invoice details, reports, or dynamic content).
You can optionally set a custom PDF page size using:
pdfWidthMm (number)pdfHeightMm (number)If you omit both, the default is A4 (210×297mm).

<h1>Invoice</h1>
<p>Customer: {{ $json.customer }}</p>
<p>Amount: ${{ $json.amount }}</p>

You can use external JavaScript libraries like QRCode.js in your PDF templates. When using ES Modules, wrap your import in a module script tag:
<script type="module">
import QRCode from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';
// Generate QR code
const qrDataUrl = await QRCode.toDataURL('https://example.com', {
width: 150,
margin: 1
});
// Set the image source
document.getElementById('qr').src = qrDataUrl;
</script>
<img id="qr" alt="QR Code" /> When using asynchronous JavaScript (QR codes, charts, API calls), you must signal when your content is ready by setting window.__RENDER_DONE__ = true. The PDF generator waits for this flag before capturing the page.
<script type="module">
import QRCode from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm';
// Initialize as false
window.__RENDER_DONE__ = false;
async function generateQR() {
// Your async operations
const qrDataUrl = await QRCode.toDataURL('https://example.com');
document.getElementById('qr').src = qrDataUrl;
// Signal that rendering is complete
window.__RENDER_DONE__ = true;
}
// Start generation
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', generateQR);
} else {
generateQR();
}
</script> ⚠️ Important: Without setting window.__RENDER_DONE__ = true, your PDF may be blank or incomplete because the generator won't wait for async operations to finish!
This workflow template:

Imagine you have an online store, and you need to generate invoices automatically whenever an order is placed. Here's how n8n can handle it:
Continue reading on similar topics
Learn how to automate PDF generation in Make.com with CustomJS. Step-by-step guide with templates for invoices, HTML to PDF, and page extraction. 600 free PDFs/month.
Generate professional PDFs in Power Automate with CustomJS. Create invoices, receipts, reports, and certificates with custom HTML templates, QR codes, and advanced formatting. No Azure Functions required.
Looking for a PDFMonkey alternative? Compare PDFMonkey vs CustomJS on price, free tier, and JavaScript rendering, with a step-by-step Make.com and n8n migration guide. 600 free PDFs/month.