Drag & Drop a PDF here or click to select
Maximum file size: 200 MB

Compression Method

PyMuPDF Settings

Welcome to the PDF Compressor!

Reduce the file size of your PDF documents quickly and easily. This tool helps you make your PDFs more shareable, faster to upload/download, and consume less storage space, while giving you control over the compression quality and method.

Whether you're preparing documents for email, web, or archiving, our compressor can help optimize your PDFs.

⚙️How it Works & Best Practices

  1. Upload Your PDF: Click the upload area or drag & drop your PDF file.
  2. Choose Compression Method & Settings (See "Settings Explained" below for details):
    • PyMuPDF: Often faster, ideal for image-heavy PDFs.
    • Ghostscript: Powerful engine, can be more effective for mixed content PDFs.
  3. Start Compression: Click the "Start Compression" button.
  4. Download: Once processing is complete, download your optimized PDF.

Best Practices:

  • Start with default settings (PyMuPDF with quality 75, or Ghostscript 'ebook' preset). These often provide a good balance.
  • If the primary goal is significantly reducing size for screen viewing and image quality is secondary, try lower quality values for PyMuPDF or the 'screen' preset for Ghostscript.
  • If preserving quality is important (e.g., for printing), use higher quality values/scales with PyMuPDF, or 'printer'/'prepress' presets with Ghostscript. Be aware this might result in less size reduction.
  • For very large PDFs or if one method doesn't yield satisfactory results, try the other method. Their approaches to compression differ.
  • Always check the compressed PDF to ensure the quality meets your requirements.

💡Settings Explained

Choose a compression method and adjust its settings for the best balance between file size and quality.

PyMuPDF: Generally faster. Good for documents where images are the main contributors to file size. It works by re-compressing or resizing images within the PDF.

  • Image Quality (1-95): Affects the quality of re-compressed images (JPEG/JBIG2). Lower numbers (e.g., 50) mean smaller file size but lower image quality. Higher numbers (e.g., 85) mean better image quality but larger file size. 75 is a good starting balance.
  • Image Scale (0.1-1.0): Resizes images within the PDF. A scale of 0.5 will make images half their original width and height, significantly reducing file size. 1.0 keeps original image dimensions.

Ghostscript: A powerful tool that re-processes the entire PDF. Can sometimes achieve better compression, especially for complex PDFs or those with many vector graphics, but might be slower. Image re-sampling is a key part of its compression.

  • Quality Preset: These are standard Ghostscript presets that configure various parameters, including image resolution (DPI) and compression algorithms.
    • screen: Lowest quality, smallest size. Good for on-screen viewing. (Typically ~72 DPI)
    • ebook: Medium quality, good balance for eBooks and general use. (Default, typically ~150 DPI)
    • printer: Higher quality, suitable for desktop printing. (Typically ~300 DPI)
    • prepress: Highest quality, for professional printing. (Typically ~300 DPI, but with less aggressive compression on other elements)
  • Image DPI (Override): Manually sets the target resolution for images when Ghostscript re-processes them. Lower DPI (e.g., 72, 96) for screen viewing, higher (e.g., 150, 300) for print. This setting overrides the default DPI associated with the chosen preset. For example, using 'ebook' preset with DPI '96' will make images sharper than 'screen' but smaller than 'ebook' at its default 150 DPI. If left blank, the preset's default DPI behavior is used.

FAQ (Frequently Asked Questions)

Is my uploaded PDF file stored permanently?
No. Your PDF file is uploaded to the server temporarily for compression. Once the process is complete and you've downloaded your file (or if an error occurs, or you navigate away), the associated job files (including your original and compressed PDF) are scheduled for cleanup and typically removed shortly thereafter or when you start a new compression.

What's the maximum file size I can upload?
The maximum effective file size is 200 MB. This is determined by the server's configuration.

Which compression method should I choose?
It depends on your PDF and priorities:

  • PyMuPDF: Generally faster. Excellent for PDFs where large, unoptimized images are the main cause of big file sizes. It directly targets image re-compression and scaling.
  • Ghostscript: More comprehensive as it re-interprets and re-writes the entire PDF. This can be beneficial for PDFs with complex structures, many vector graphics, or embedded fonts, in addition to images. It might be slower but can sometimes achieve better overall compression, especially if the PDF has non-image bloat.
If unsure, try PyMuPDF first due to its speed. If the result isn't optimal, then try Ghostscript.

Will the compressed file always be smaller?
Usually, yes. However, if a PDF is already highly optimized, or if you select settings that prioritize quality over size (e.g., Ghostscript 'prepress' preset, or PyMuPDF with 95 quality and 1.0 scale), the reduction might be minimal. In very rare cases, for specific complex PDFs with high-quality settings, the output could theoretically be slightly larger if the re-processing introduces minor overhead that isn't offset by compression gains.

What happens to the quality of my PDF?
PDF compression, especially for images, often involves a trade-off between file size and visual quality. Lowering image quality/resolution is a primary way to reduce size. Text and vector graphics are generally less affected by "lossy" compression but can be affected by changes in rendering engines or downsampling. You can control the aggressiveness of image compression with the provided settings. Always preview your compressed PDF to ensure the quality is acceptable for your needs.

Can this tool repair corrupted PDFs?
No, this tool is designed for compressing valid PDF files. It's unlikely to fix a corrupted PDF and may fail to process it.

What technology is used for the compression?
This web tool uses PHP for the user interface and server-side management. The actual PDF compression is performed by a Python script that leverages powerful libraries: PyMuPDF (Fitz) for its compression method, and Ghostscript for its method.

⚠️ Important Disclaimer & Terms of Use

Compression & Quality: This tool attempts to reduce PDF file sizes. The nature of compression, especially "lossy" compression for images, means there might be a reduction in visual quality. The extent of this depends on the PDF content and the settings you choose. Always review the compressed file to ensure it meets your quality standards.

No Guarantees: This tool is provided "as-is" without any warranties, express or implied. We do not guarantee its availability, reliability, suitability for any particular purpose, or the outcome of the compression (e.g., final file size or quality).

Data Privacy & Security: Uploaded files are intended for temporary storage on our servers solely for the purpose of compression and are automatically scheduled for deletion. However, please do not upload highly sensitive or confidential documents if you have any concerns. While we take reasonable measures, we cannot guarantee absolute security for a free online tool.

File Ownership & Rights: You are solely responsible for the files you upload. Ensure you have the necessary rights and permissions to upload and process any PDF file submitted to this service. Do not upload copyrighted material without permission or files containing illegal content.

Limitation of Liability: We shall not be liable for any direct, indirect, incidental, special, consequential, or exemplary damages, including but not limited to, damages for loss of profits, goodwill, use, data, quality, or other intangible losses (even if we have been advised of the possibility of such damages), resulting from the use or the inability to use the service.

Backup Your Originals: This tool modifies a copy of your PDF. Always keep a backup of your original PDF files before uploading them to any online tool, including this one.

By using this PDF Compressor, you acknowledge that you have read, understood, and agree to these terms.