Integration-n8n - Work With PDF Toolkit Community Node-compress-pdfs

Introduction

Compessing PDFs can be convert HTML or code into a PDF, compress the generated PDF, and return it as a binary response. With n8n and the PDF Toolkit node, you can automate this process effortlessly. This guide will walk you through how to compress PDF files using n8n.

Why Compress PDFs in n8n?

  • -  Automate document processing without manual intervention
  • -  Easily combine PDFs received from multiple sources

Prerequisites

  • -  A self-hosted n8n instance
  • -  The CustomJS PDF Toolkit node installed
  • -  Compress PDF files

Workflow Overview

The workflow consists of the following steps:

  1. -  HTML or Code to PDF – Request PDF using HTML or Code
  2. -  Compress Pages from PDF – Use the PDF Toolkit node to compress files

Step-by-Step Guide

1. Request HTML and Convert PDFs in n8n

Use a Webhook node to receive files dynamically or a Request HTML or Code to fetch stored PDFs.

2. Compress PDFs Using PDF Toolkit

  • -  Add the Compress Pages from PDF node from the PDF Toolkit
  • -  Select PDF pages
  • -  Configure the output settings (e.g., file name, storage location)

Final Thoughts

With n8n, compressing PDFs is automated, reducing manual work and improving efficiency. Whether you're dealing with invoices, reports, or forms, this workflow can save time and streamline your document management.