Templates / Convert HTML to PDF and compress files with CustomJS API

Convert HTML to PDF and compress files with CustomJS API

Unknown

by CustomJS ✓ · 2,208 views · created 2025-05-05 · Document Extraction

Unknown. This template uses community nodes we can't verify statically. Uses community nodes that can't be verified statically (unverified community packages are off by default in 3.0). Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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”.

  1. HTML to PDF (Html2Pdf): uses Html2Pdf
  2. Set PDF URL (Code): runs custom JavaScript code
  3. Compress PDF: uses Compress PDF
  4. Compress PDF: work with url

Services it uses

Pdf Toolkit (community)

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)

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.…

Excerpt from CustomJS's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.