PDF Compress Optimize

Smart PDF optimization: image downsampling, redundant object cleanup, stream compression

Compress and optimize PDF size using Ghostscript and qpdf pipeline.

Optimization steps:

  • Downsample color/gray/mono images
  • Font subsetting and duplicate image detection
  • Stream recompression and object stream optimization
  • Optional linearization for web delivery

Example Results

2 examples

Balanced eBook Compression

Applies ebook profile with linearization to reduce size while preserving readable quality

pdf-compress-optimize-example1.pdf View File
View input parameters
{ "sourceFile": "/Users/quyue/www/elysia-tools/public/samples/pdf/pdf-2026-02-19-source-4pages.pdf", "quality": "ebook", "imageDpi": 0, "linearize": true }

Maximum Screen Compression

Uses screen profile and explicit 110 DPI override for strongest file size reduction

pdf-compress-optimize-example2.pdf View File
View input parameters
{ "sourceFile": "/Users/quyue/www/elysia-tools/public/samples/pdf/pdf-2026-02-19-source-4pages.pdf", "quality": "screen", "imageDpi": 110, "linearize": false }

Click to upload file or drag and drop file here

Maximum file size: 700MB Supported formats: application/pdf

Key Facts

Category
Documents & PDF
Input Types
file, select, number, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

Reduce the file size of your documents with our professional-grade PDF compression tool. By leveraging advanced Ghostscript and qpdf pipelines, this utility performs intelligent image downsampling, font subsetting, and stream recompression to shrink large PDFs while maintaining visual clarity.

When to Use

  • Preparing large documents for email attachments with strict size limits.
  • Optimizing high-resolution PDFs for faster loading and smoother viewing on the web.
  • Reducing storage footprint for document archives without sacrificing readability.

How It Works

  • Upload your source PDF file to the tool.
  • Select a compression profile ranging from Screen (maximum reduction) to Prepress (highest quality).
  • Optionally set a custom DPI override for images or toggle web linearization.
  • Process the file to generate an optimized version ready for download.

Use Cases

Shrinking heavy reports containing high-resolution charts for quick email sharing.
Optimizing digital portfolios for portfolio websites to ensure fast page load times.
Converting bulky scanned documents into lightweight, web-ready files.

Examples

1. Balanced eBook Compression

Content Creator
Background
A creator has a 50MB PDF document containing text and images intended for digital distribution.
Problem
The file is too large for standard email attachments and slow to download.
How to Use
Upload the PDF, select the 'eBook (balanced)' profile, and ensure 'Linearize for Web' is checked.
Example Config
quality: ebook, linearize: true
Outcome
A significantly smaller file that retains high readability and loads progressively in web browsers.

2. Maximum Screen Compression

Archivist
Background
An archivist needs to store hundreds of scanned documents that are currently taking up too much server space.
Problem
High-resolution scans are unnecessarily large for simple reference viewing.
How to Use
Upload the file, select the 'Screen (max)' profile, and set the Image DPI Override to 110.
Example Config
quality: screen, imageDpi: 110, linearize: false
Outcome
A highly compressed file optimized for minimal storage usage while remaining perfectly legible.

Try with Samples

pdf, image, barcode

Related Hubs

FAQ

Does compression reduce the quality of my PDF?

It depends on the profile chosen. Screen and eBook profiles reduce image resolution to save space, while Printer and Prepress profiles prioritize higher visual fidelity.

What is web linearization?

Linearization reorganizes the PDF structure so that the first page can be displayed in a web browser before the entire file has finished downloading.

Can I specify a custom image resolution?

Yes, you can use the Image DPI Override field to set a specific resolution, which is useful for fine-tuning the balance between file size and image sharpness.

Is my data secure?

Your files are processed locally or in a secure temporary environment and are not stored permanently on our servers.

What file formats are supported?

This tool is specifically designed for PDF documents.

API Documentation

Request Endpoint

POST /en/api/tools/pdf-compress-optimize

Request Parameters

Parameter Name Type Required Description
sourceFile file (Upload required) Yes -
quality select No -
imageDpi number No -
linearize checkbox No -

File type parameters need to be uploaded first via POST /upload/pdf-compress-optimize to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-pdf-compress-optimize": {
      "name": "pdf-compress-optimize",
      "description": "Smart PDF optimization: image downsampling, redundant object cleanup, stream compression",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=pdf-compress-optimize",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]