npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-pdf-compress

v0.1.2

Published

Compress PDF files in n8n workflows using Ghostscript WASM (pure JavaScript/WebAssembly, no system dependencies).

Downloads

341

Readme

n8n-nodes-pdf-compress

Compress PDF files in n8n workflows using Ghostscript compiled to WebAssembly. This node is free, requires no API key or external service, and runs purely in Node.js—no system Ghostscript install needed.

Features

  • Free & no API: No sign-up, API key, or third-party service. Everything runs locally in your n8n instance.
  • Pure JS/WASM: Works in any n8n environment (Docker, Cloud, Desktop) without additional system dependencies.
  • Ghostscript Power: Uses the industry-standard Ghostscript engine (via @okathira/ghostpdl-wasm) for high-quality compression.
  • Compression Presets: Choose between different quality/size trade-offs (Screen, Ebook, Printer, Prepress, Default).

Presets

  • Screen: Lowest quality, smallest file size (72 dpi). Ideal for web viewing.
  • Ebook: Medium quality, medium file size (150 dpi). Good balance for reading on devices.
  • Printer: High quality (300 dpi). Suitable for home/office printing.
  • Prepress: Highest quality (300 dpi). Preserves color and quality for professional printing.
  • Default: Standard Ghostscript compression settings.

Usage in n8n

  1. Add the PDF Compress node to your workflow.
  2. Select the Binary Property where your PDF is located (default: data).
  3. Choose a Compression Quality preset.
  4. The node will output the compressed PDF in the same binary property (with .compressed.pdf suffix) and add compression stats to the JSON output.

JSON Output Example

{
  "pdfCompress": {
    "originalSizeBytes": 12110000,
    "compressedSizeBytes": 1240000,
    "percentageSaved": "89.76%",
    "presetUsed": "/screen"
  }
}

Developer Notes

This node was built using:

To test locally:

node scripts/test-compress.mjs <path-to-pdf>

License

This project is licensed under the AGPL-3.0-or-later license. This is required because the project depends on Ghostscript (via @okathira/ghostpdl-wasm), which is also licensed under the AGPL. See the LICENSE file for details.