Skip to content

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Document Compression — Web ​

ComPDF for Web optimizes PDF documents by reducing file size: it recompresses images, removes redundant information, compresses data streams, and optimizes page content. Compression runs on a copy of the document and returns the compressed PDF data, so the document open in the viewer is not changed.

Benefits of ComPDFKit Document Compression ​

  • Image Compression: Control the image quality and the resolution (PPI) of color, grayscale, and monochrome images.
  • Rich Optimization Flags: 30+ optimization flags to remove unused resources, metadata, thumbnails, JavaScript actions, and more.
  • Safe Defaults: Without extra settings, only lossless cleanup is applied, so annotations, forms, bookmarks, and embedded fonts are kept.

Guides for Document Compression ​