Back to Learning Center

Batch Compress PDFs: How to Process Multiple Files Efficiently

Learn how to compress dozens or hundreds of PDFs at once. Save time with batch processing techniques and workflow optimization tips.

PDF Smaller Team
8 min read
batch processingcompressionautomationworkflow

Batch Compress PDFs: How to Process Multiple Files Efficiently

You've got 50 PDFs that are all too large. You need to compress them all.

Option A: Compress them one by one. Spend your entire afternoon clicking "upload," "download," "upload," "download"...

Option B: Batch process them. Compress all 50 at once.

Yeah, let's go with Option B.

Why Batch Compression Matters

Time savings are massive:

  • 1 PDF: 30 seconds
  • 50 PDFs individually: 25 minutes
  • 50 PDFs batch processed: 2-5 minutes

Plus:

  • Consistent compression settings across all files
  • Less manual clicking and babysitting
  • Can run in background while you work
  • Fewer human errors (forgetting files, wrong settings)

If you regularly work with multiple PDFs, batch processing is a game-changer.

When You Need Batch Compression

Common scenarios:

1. Scanned Document Archives

  • Digitized 200 paper documents
  • Each scan is 5-10 MB
  • Need to compress for long-term storage

2. Client Deliverables

  • Portfolio with 30 project PDFs
  • Each is 20+ MB
  • Need to email or upload to client portal

3. Website Content

  • 100 downloadable PDF resources
  • Slow page load times
  • Need compressed versions for web

4. Email Campaigns

  • 50 PDF attachments for different recipients
  • Gmail 25 MB limit per email
  • All need compression

5. Archival Systems

  • Monthly reports (12+ files per year)
  • Storage costs adding up
  • Compress old files to save space

Batch Compression Methods

Method 1: Browser-Based (Simple, No Software)

Using our PDF compression tool:

Current limitation: One file at a time

Efficient workflow:

  1. Open PDF Smaller's compression tool in a browser tab
  2. Open your file manager in another window
  3. Drag and drop first file
  4. While it's processing, prepare the next file
  5. Download, immediately drag next file
  6. Repeat

Time per file: ~30 seconds Best for: 5-20 files

Pro tip: Use two browser windows side-by-side for faster workflow.

Method 2: Desktop Software (Best for Large Batches)

If you have Adobe Acrobat Pro:

Steps:

  1. Tools → Optimize PDF → Batch Optimize
  2. Add files (or entire folders)
  3. Choose compression settings
  4. Click "OK" and let it run

Time: Processes 100 files in 5-10 minutes

Free alternatives:

PDFtk (Command Line - Free)

# Compress all PDFs in a folder
for file in *.pdf; do
  gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
     -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH \
     -sOutputFile="compressed_${file}" "${file}"
done

Ghostscript (Command Line - Free)

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
   -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH \
   -sOutputFile=output.pdf input.pdf

CPDF (Command Line - Free for non-commercial)

cpdf -squeeze input.pdf -o output.pdf

Method 3: Cloud Storage with Automation

Google Drive + Google Apps Script:

  1. Upload all PDFs to Google Drive
  2. Create a script to compress them
  3. Run the script
  4. Download compressed files

Pros: No local processing power needed Cons: Requires technical setup

Dropbox/OneDrive: Similar automation possible with third-party tools like Zapier or Make (formerly Integromat).

Method 4: Python Script (For Developers)

If you're comfortable with code:

import os
from PyPDF2 import PdfReader, PdfWriter

def compress_pdf(input_path, output_path):
    reader = PdfReader(input_path)
    writer = PdfWriter()

    for page in reader.pages:
        writer.add_page(page)

    writer.compress()

    with open(output_path, 'wb') as output_file:
        writer.write(output_file)

# Batch process all PDFs in a folder
input_folder = "/path/to/pdfs"
output_folder = "/path/to/output"

for filename in os.listdir(input_folder):
    if filename.endswith(".pdf"):
        input_path = os.path.join(input_folder, filename)
        output_path = os.path.join(output_folder, f"compressed_{filename}")
        compress_pdf(input_path, output_path)
        print(f"Compressed: {filename}")

Pros: Fully customizable, free, fast Cons: Requires Python knowledge

Batch Compression Best Practices

1. Organize Files First

Before compressing:

  • Create a "To Compress" folder
  • Move all PDFs there
  • Create an "Output" folder for compressed files

Why: Keeps originals safe, prevents accidental overwriting

2. Test Compression Settings on One File First

Workflow:

  1. Pick a representative file
  2. Compress it with your chosen settings
  3. Check quality and file size
  4. If good, apply same settings to all files
  5. If not, adjust settings and test again

Why: Saves time and prevents batch-compressing with wrong settings

3. Use Consistent Naming

Name output files clearly:

  • original.pdforiginal_compressed.pdf
  • Or use folders: /original/ vs /compressed/

Why: Easy to identify which files are processed

4. Keep Originals Until Verified

Don't delete original files until:

  • You've opened and checked several compressed files
  • File sizes are reasonable
  • Quality meets your standards
  • You've confirmed all files processed successfully

Why: Easy to recover if something goes wrong

5. Monitor Processing

Don't walk away completely:

  • Check progress every few minutes
  • Watch for errors or stuck files
  • Verify output files are being created

Why: Catch issues early before processing 100 files incorrectly

Compression Settings for Different Use Cases

For Email Distribution

  • Target: Under 2-5 MB per file
  • Quality: Medium compression
  • DPI: 72-150 (screen viewing)
  • Color: RGB

For Web Downloads

For Archival Storage

  • Target: Balance quality and size (maybe 30-50% reduction)
  • Quality: Low to medium compression
  • DPI: 300 (maintain print quality)
  • Color: Keep original color space

For Internal Use

  • Target: Whatever fits your needs
  • Quality: Medium compression usually fine
  • DPI: 150
  • Color: RGB

Handling Different PDF Types in a Batch

The problem: Not all PDFs compress equally.

Example batch:

  • 10 text-heavy reports (compress 80%)
  • 20 image-heavy presentations (compress 90%)
  • 5 scanned documents (compress 50%)

Solution options:

Option 1: Separate batches

  • Group similar PDFs together
  • Compress each group with optimized settings
  • More work upfront, better results

Option 2: Middle-ground settings

  • Use medium compression for everything
  • Accept that some files won't be optimally compressed
  • Faster but less efficient

Option 3: Manual review afterward

  • Batch compress everything with conservative settings
  • Identify files that are still too large
  • Recompress those individually with higher settings

Time Estimates

Processing 50 PDFs (average 10 MB each):

Browser-based (one at a time): 25-30 minutes Desktop software (batch): 3-5 minutes Command line script: 2-3 minutes Cloud automation: 5-10 minutes (after setup)

Processing 200 PDFs:

Browser-based: 2-3 hours (not recommended) Desktop software: 10-15 minutes Command line: 5-10 minutes Cloud automation: 15-30 minutes

Troubleshooting Batch Processing

Problem 1: One File Causes Entire Batch to Fail

Fix:

  • Remove problematic file
  • Process it separately
  • Continue with remaining files

Problem 2: Inconsistent Compression Results

Fix:

  • Check if PDFs are different types (scanned vs digital)
  • Separate into groups by type
  • Apply different settings to each group

Problem 3: Output Files Are Too Large

Fix:

  • Increase compression level
  • Reduce image DPI
  • Remove unnecessary embedded fonts

Problem 4: Output Files Look Terrible

Fix:

  • Reduce compression level
  • Increase image quality settings
  • Check that you're not compressing already-compressed files

Problem 5: Processing is Taking Forever

Fix:

  • Close other applications (free up CPU/RAM)
  • Process smaller batches
  • Use faster storage (SSD vs HDD)
  • Check for very large files that are slowing things down

Advanced: Automation with Scripts

For regular batch compression:

Windows Batch Script:

@echo off
for %%f in (*.pdf) do (
    echo Compressing %%f...
    "C:\path\to\tool\compress.exe" "%%f" "compressed_%%f"
)
echo Done!

Mac/Linux Shell Script:

#!/bin/bash
for file in *.pdf; do
    echo "Compressing $file..."
    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
       -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH \
       -sOutputFile="compressed_$file" "$file"
done
echo "All files compressed!"

Set up once, run anytime you need batch compression.

Quality Control Checklist

After batch compression, verify:

  • All files processed successfully
  • File sizes are reduced appropriately
  • Random sample of files opens correctly
  • Quality is acceptable
  • Text is still readable
  • Images look good
  • No corrupted files
  • Original files are still available

The Bottom Line

Batch compress PDFs when:

  • You have 10+ files to process
  • Files are similar types
  • You want consistent compression settings
  • You value your time

Best methods:

  • 5-20 files: Browser-based with efficient workflow
  • 20-100 files: Desktop software or command line
  • 100+ files: Command line scripts or automation
  • Regular batches: Set up automation scripts

Time savings:

  • Individual: 30 seconds × 50 files = 25 minutes
  • Batch: 3-5 minutes total
  • Savings: 80-85% faster

Best practices:

  • Test settings on one file first
  • Keep originals until verified
  • Organize input and output folders
  • Monitor processing
  • Verify results with spot checks

Ready to batch compress?

Start with our compression tool - perfect for smaller batches or testing settings before scaling up.


Last updated: December 17, 2025

Ready to try it yourself?

Put what you learned into practice with our free tools.

Related Articles