Skip to content
DEVPANTRY.COM

PDF Compressor & Structural Optimizer

Rewrite PDF object streams and clear common document-info fields locally. Compare the before-and-after sizes; embedded images are not downsampled.

Rewrite object streams and clear common document-info fields. The actual size change is shown after processing.

Structural optimization, without image downsampling

This implementation does not recompress images embedded in an existing PDF. A smaller file or a particular KB limit cannot be guaranteed.

For large scans, compress the source images first, then combine them with Image to PDF.

Understand what this PDF optimizer changes

  1. Choose a PDF from your device.
  2. Run structural optimization.
  3. Compare the input and output sizes before downloading the result.

Output and file-size behavior

The optimizer uses pdf-lib object streams and clears common title, author, subject, creator, and producer fields. It does not resample scans or guarantee a smaller file. Already optimized PDFs can remain the same size or grow. For image-heavy PDFs, compress the source images before making a new PDF.

Related tools and implementation

Compress source images, resize an image, or read the PDF processing guide.