Convert HTML to PDF and compress files with CustomJS API
UnknownWhat this workflow does
This workflow has 5 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Pdf Toolkit (community).
How it runs
Trigger: Manually, when you click “Execute workflow”.
- HTML to PDF (Html2Pdf): uses Html2Pdf
- Set PDF URL (Code): runs custom JavaScript code
- Compress PDF: uses Compress PDF
- Compress PDF: work with url
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 2 community packages, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @custom-js/n8n-nodes-pdf-toolkit is verified or supports 3.0 (used in HTML to PDF).
- Check that @custom-js/n8n-nodes-pdf-toolkit is verified or supports 3.0 (used in Compress PDF file, Compress PDF file1).
Nodes used (4)
- Html2Pdf
@custom-js/n8n-nodes-pdf-toolkit.html2Pdf - Compress PDF
@custom-js/n8n-nodes-pdf-toolkit.CompressPDF - Manual Trigger
n8n-nodes-base.manualTrigger - Code
n8n-nodes-base.code
From the author
This n8n template demonstrates how to convert HTML into a PDF, compress the generated PDF, and return it as a binary response using the PDF Toolkit from www.customjs.space. Notice Community nodes can only be installed on self-hosted instances of n8n.…