#114·pdfcraft

PDF compression produces very little size reduction

Author: serhumanos001Created Aug 27, 2026Updated Sep 4, 2026

Hi! I'm testing the PDF compression feature in PDFCraft and I'm trying to understand how the different compression levels are expected to work.

I tested the Low compression option on a PDF containing a significant amount of content/images, but the resulting file was only about 1 MB smaller than the original.

For example:

Original PDF:    XX MB
Low compression: XX MB
Reduction:       ~1 MB

I investigated the Docker image and found that workers/compress.worker.js uses coherentpdf:

javascript
coherentpdf.compress(pdf);
coherentpdf.squeezeInMemory(pdf);

For low, it then generates and compresses object streams:

javascript
coherentpdf.toMemoryExt(
  pdf,
  false,
  false,
  false,
  true,
  true
);

From what I can see, this appears to optimize PDF streams and structure, but it does not seem to perform image downsampling or JPEG recompression.

I also noticed that the project includes PyMuPDF WASM, Pillow, OpenCV, and QPDF WASM, so I was wondering whether there is another image-compression step elsewhere in the application.

Questions

  1. Is the current Low compression level expected to only perform structural/stream compression?
  2. Does PDFCraft currently perform any image downsampling or JPEG/PNG recompression when using Low, Medium, or High?
  3. If not, is image recompression planned for the compression feature?
  4. What is the intended difference in compression behavior between Low, Medium, and High?
  5. Is there a recommended way to achieve significantly smaller PDFs, especially for PDFs containing scanned pages or high-resolution images?

For example, I would expect something along these lines for image-heavy PDFs:

Low:     aggressive image compression / downsampling
Medium:  balanced compression
High:    higher quality with moderate compression
Maximum: preserve original image quality

I'm asking because a PDF that is, for example, 30–50 MB may only become approximately 1 MB smaller with Low, which seems much less than what I would expect from a PDF compression tool.

Thanks!