
Compressing PDF Files: Complete Tutorial

Sarah Mitchell
Senior PDF Specialist
Large PDF files are hard to email, upload, and share. This complete tutorial explains how PDF compression works and walks through the best methods to reduce PDF file size without sacrificing quality.
Table of Contents
- Why PDFs Get Large
- Method 1: Compress PDFs Online
- Method 2: Desktop Software for Compression
- Method 3: Reducing PDF Size Before Creation
- Advanced Compression Techniques
- Common Compression Problems
- Best Practices for PDF Compression
- Compressing Different Types of PDFs
- Automating PDF Compression
- Conclusion
PDF files can grow large quickly, especially when they contain high-resolution images, scanned pages, or embedded multimedia. A 50 MB PDF is difficult to email, slow to upload, and frustrating to share. In this complete tutorial, you will learn how PDF compression works, what makes PDFs large in the first place, and the best methods to reduce file size without sacrificing readability.
Why PDFs Get Large
Understanding the causes of bloated PDFs helps you choose the right compression strategy. The most common culprits are:
- High-resolution images: Photos embedded at print quality (300 DPI or higher) are the single biggest source of large file sizes. A single high-res photo can add 5–10 MB.
- Scanned pages: Scanned documents are essentially images of pages. A 20-page scan can easily exceed 30 MB.
- Embedded fonts: PDFs can embed entire font families. Embedding multiple fonts adds megabytes.
- Unoptimized content streams: PDFs store text and graphics as content streams. If these are not compressed, the file is larger than necessary.
- Embedded multimedia: Audio, video, and interactive elements add significant weight.
- Redundant objects: Some PDF creators leave duplicate or unused objects in the file structure.
How PDF Compression Works
PDF compression reduces file size through two main approaches:
- Lossless compression: Reduces file size without removing any data. The output is visually identical to the input. This works by optimizing how data is stored — for example, using more efficient encoding for text streams.
- Lossy compression: Reduces file size by discarding some data, typically by downsampling and re-compressing images. The output looks nearly identical but is much smaller.
Most compression tools offer multiple levels — light, medium, and strong — which correspond to different balances of quality and size reduction.
Method 1: Compress PDFs Online
Online compression is the fastest option for most users. You upload a file, choose a compression level, and download the result.
Step-by-Step: Compressing a PDF Online
- Choose a compression tool: Look for one that offers multiple compression levels and processes files securely. VisualDocs provides a free PDF compressor with adjustable quality settings.
- Upload your PDF: Drag and drop the file or browse to select it.
- Select a compression level: Most tools offer "Basic" (light compression, high quality), "Strong" (medium compression, good quality), and "Extreme" (maximum compression, reduced quality). Start with Basic if you are unsure.
- Click compress: The tool processes your file and shows you the resulting size.
- Download the compressed PDF: Save it and open it to verify the quality meets your needs.
What to Expect from Online Compression
- Basic compression typically reduces file size by 20–40% with no visible quality loss.
- Strong compression reduces size by 50–70% with minor quality reduction, mainly in images.
- Extreme compression can reduce size by 80% or more, but images may appear noticeably softer.
Method 2: Desktop Software for Compression
Desktop tools are better for large files, batch processing, and when you need precise control over compression settings.
Using Adobe Acrobat Pro
Acrobat Pro offers the most sophisticated compression options:
- Open the PDF in Acrobat Pro.
- Go to File > Save as Other > Reduced Size PDF.
- Choose a compatibility version (Acrobat version determines which features are supported).
- Click Save and choose where to store the compressed file.
For more control, use the PDF Optimizer (File > Save as Other > Optimized PDF). This lets you selectively compress images, subset fonts, remove unused objects, and flatten form fields.
Using Ghostscript (Command Line)
Ghostscript is a free, powerful tool for compression. A common command for strong compression downsamples images to 72 DPI and uses JPEG compression for color images. This can reduce a 30 MB file to under 2 MB. For higher quality, use 150 DPI instead.
Using Preview on macOS
Preview has a built-in filter for reducing PDF size:
- Open the PDF in Preview.
- Go to File > Export.
- In the Quartz Filter dropdown, select "Reduce File Size."
- Click Save.
Note that Preview's filter is aggressive and can noticeably reduce image quality. Test the output before using it for important documents.
Method 3: Reducing PDF Size Before Creation
The best way to handle large PDFs is to prevent them from being large in the first place. If you control the source document, you can optimize before exporting:
- Downsample images: Before creating the PDF, reduce image resolution to 150 DPI for screen viewing or 300 DPI for print. Most word processors and design tools let you set this.
- Use efficient image formats: JPEG is best for photographs. PNG is better for screenshots and graphics with few colors. Avoid BMP or TIFF.
- Subset fonts: When exporting, choose to embed only the font characters used in the document, not entire font families.
- Avoid unnecessary pages: Remove blank pages and redundant content before exporting.
- Use PDF/A only when required: PDF/A archival format embeds more data and produces larger files. Use it only for archival purposes.
Advanced Compression Techniques
Flattening Form Fields
If your PDF contains fillable form fields that have been completed, flattening them converts the fields into static content. This reduces file size and prevents further editing.
Removing Metadata
PDFs can contain metadata like author names, creation dates, and editing history. Removing this data saves a small amount of space and improves privacy. Most compression tools offer a "remove metadata" or "sanitize" option.
Optimizing for Web
Web-optimized PDFs (also called "linearized" or "fast web view") are structured so that the first page loads and displays before the entire file downloads. This improves the viewing experience for online readers. Most compression tools can produce web-optimized output.
Common Compression Problems
Problem: Text Becomes Blurry
This happens when compression downsamples images that contain text (common with scanned documents). Solution: use a higher compression level or use OCR to convert scanned text into real text, which compresses far better than images.
Problem: File Size Does Not Change
If your PDF contains mostly vector graphics and text with no images, compression has little to work with. The file is already efficient. If the file contains embedded fonts, subsetting them may help.
Problem: Colors Shift After Compression
Aggressive JPEG compression can alter colors. Solution: use a lighter compression level or choose a tool that preserves color profiles.
Best Practices for PDF Compression
- Always keep the original: Compressed files lose data. Keep the original for archival and use the compressed version for sharing.
- Test different levels: Try Basic compression first. If the file is still too large, step up to Strong. Only use Extreme when size is critical.
- Compress once, not repeatedly: Repeatedly compressing a PDF degrades quality each time. Compress from the original each time.
- Check the output: Open the compressed file and verify text is readable and images are acceptable before sharing.
- Consider your audience: If recipients will print the document, use lighter compression. If they will only view on screen, stronger compression is fine.
Compressing Different Types of PDFs
Not all PDFs compress the same way. The type of content in your PDF determines which compression strategy will be most effective.
Image-Heavy PDFs
PDFs that contain many photographs or high-resolution images are the best candidates for compression. These files are often large because images are embedded at print quality (300 DPI or higher) even when the document will only be viewed on screen.
- Strategy: Use lossy compression with image downsampling. Reduce image resolution to 150 DPI for screen viewing or 72 DPI for web thumbnails.
- Expected reduction: 50–80% reduction is common.
- Tools: Ghostscript with JPEG image compression, Adobe Acrobat Pro's PDF Optimizer, or online compressors set to "Strong" or "Extreme."
- Watch out for: Text within images becoming blurry. If the PDF contains scanned text, use OCR to convert it to real text before compressing.
Text-Heavy PDFs
PDFs that are primarily text with few or no images (like reports, contracts, and manuals) are already quite efficient. There is less to compress.
- Strategy: Focus on font subsetting and removing redundant objects rather than image compression. Lossless compression is sufficient.
- Expected reduction: 10–25% reduction is typical.
- Tools: Adobe Acrobat Pro's PDF Optimizer with font subsetting, or any compressor set to "Basic" or "Light."
- Watch out for: Minimal size reduction. If the file is still too large, consider splitting it into smaller parts instead.
Scanned PDFs
Scanned documents are essentially images of pages, so they are among the largest PDFs. A 20-page scan can easily exceed 30 MB.
- Strategy: Downsample images to 150 DPI (sufficient for screen reading) and apply JPEG compression. If the scan contains text, run OCR first to add a text layer, which does not increase size significantly but makes the document searchable.
- Expected reduction: 60–85% reduction is common with aggressive settings.
- Tools: Ghostscript with 150 DPI downsampling, Adobe Acrobat Pro's Optimizer with scanned document optimization, or online compressors set to "Strong."
- Watch out for: Text becoming illegible at very low DPI. Test the output by reading the smallest text in the document.
PDF Portfolios and Interactive PDFs
PDFs that contain embedded multimedia (video, audio, interactive forms) are difficult to compress because the multimedia content does not compress well with standard PDF compression tools.
- Strategy: Remove or replace embedded multimedia with links to external content. Flatten interactive form fields. Remove embedded JavaScript and 3D models if not needed.
- Expected reduction: Varies widely depending on how much multimedia is embedded.
- Tools: Adobe Acrobat Pro's PDF Optimizer is the best tool for selectively removing multimedia and interactive elements.
- Watch out for: Removing multimedia may change the document's functionality. Keep an original copy in case you need the interactive features later.
Automating PDF Compression
If you regularly compress PDFs — for example, as part of a document workflow or before uploading files to a web portal — automation can save significant time.
Batch Compression with Ghostscript
Ghostscript is the most popular tool for automated PDF compression. You can write a shell script that processes every PDF in a directory:
- Create a script that loops through all PDF files in a target folder.
- For each file, run Ghostscript with your preferred compression settings (e.g., 150 DPI, JPEG quality 80).
- Save the compressed files to an output folder with a suffix like "-compressed."
- Log the original and compressed file sizes so you can track the reduction.
Watched Folder Automation
Some desktop tools support "watched folder" automation:
- Adobe Acrobat Pro: Can set up a watched folder that automatically applies a predefined compression profile to any PDF placed in it.
- Automator (macOS): Create a Folder Action that runs a Ghostscript compression command on any PDF dropped into a specific folder.
- Hazel (macOS): A third-party automation tool that can watch folders and run compression scripts on new PDFs.
Compression in Document Workflows
In organizational settings, compression can be integrated into document management workflows:
- Pre-upload compression: Automatically compress PDFs before they are uploaded to a document management system or web portal.
- Email gateway compression: Some email systems can be configured to compress large PDF attachments before sending.
- Scheduled compression: Run a nightly script that compresses all new PDFs added during the day to a shared folder.
Automation Best Practices
- Always keep originals: Automated compression should never overwrite the original file. Save compressed versions to a separate location.
- Log everything: Record original size, compressed size, compression settings, and any errors for each file.
- Test settings on a sample: Before running batch compression on hundreds of files, test your settings on a representative sample to verify quality.
- Handle failures gracefully: Some PDFs (encrypted, corrupted, or with unusual structures) may fail to compress. Your script should log the failure and continue to the next file.
Conclusion
Compressing PDFs is a balance between file size and quality. For most users, an online compressor with adjustable levels is the simplest solution. Desktop tools like Adobe Acrobat Pro and Ghostscript offer more control for power users. By understanding what makes PDFs large and how compression works, you can choose the right approach for every situation. Start light, test the output, and increase compression only as much as necessary.
Sources & References
About the Author

Sarah Mitchell
Senior PDF Specialist
Sarah has 8+ years of experience in document management and PDF workflows. She specializes in helping businesses streamline their document processes.
Frequently Asked Questions
How much can I compress a PDF?
Does compressing a PDF reduce print quality?
Is online PDF compression safe?
Can I compress a PDF without internet?
Why is my compressed PDF still large?
Start working smarter today
Join 500,000+ users who trust VisualDocs for their daily image and PDF workflows.


