How to Compress PDFs: Methods, Tools, and Best Practices
Β· 6 min read
Large PDF files are a common frustration β they are slow to upload, download, and share via email. Most email services limit attachments to 10-25 MB, and large files consume unnecessary storage and bandwidth. The good news is that most PDFs can be significantly compressed without noticeable quality loss. This guide explains the methods, tools, and best practices for effective PDF compression.
Why Compress PDFs?
PDF compression offers multiple benefits that affect both workflow efficiency and user experience:
- Faster sharing: Smaller files upload and download faster, especially on slower connections. A 50 MB PDF that takes 2 minutes to download at 5 Mbps becomes a 10-second download at 5 MB
- Email compatibility: Stay within attachment size limits (Gmail: 25 MB, Outlook: 20 MB, Yahoo: 25 MB)
- Storage savings: Reduced file sizes mean lower cloud storage costs and more efficient backups
- Faster web loading: PDFs embedded on websites load faster, improving user experience and SEO
- Mobile friendliness: Smaller files are easier to view and navigate on mobile devices with limited memory
π οΈ Compress your PDFs
Image Quality vs File Size
Images are typically the largest component of a PDF file, often accounting for 80-95% of the total size. Optimizing images is the most effective way to reduce file size:
Resolution (DPI)
- Screen/web viewing: 72-150 DPI is sufficient. Most screens display at 72-96 DPI
- Standard printing: 150-200 DPI provides good quality for general documents
- High-quality printing: 300 DPI is the standard for professional print
- Photos for archival: 300-600 DPI preserves maximum detail
Many PDFs contain images at 300+ DPI when they will only ever be viewed on screen. Downsampling these to 150 DPI can reduce file size by 75% with no visible quality loss on screen.
Compression Types
- JPEG compression: Lossy compression ideal for photographs. Quality settings of 75-85% provide excellent visual quality with significant size reduction
- JPEG2000: Better compression ratios than JPEG at the same quality, but less universally supported
- Flate/ZIP compression: Lossless compression for text, line art, and graphics where quality preservation is critical
- JBIG2: Highly efficient compression for scanned black-and-white documents
Color Space Optimization
Converting images from CMYK to RGB can reduce size by approximately 25%, since CMYK uses four color channels versus three for RGB. Only use CMYK if the PDF is specifically intended for professional printing.
Font Subsetting
Embedded fonts can add 100 KB to several megabytes to a PDF. Font subsetting includes only the characters actually used in the document rather than the entire font file:
- Full font embedding: Includes every glyph in the font (potentially hundreds of KB per font)
- Font subsetting: Includes only characters used in the document (typically 10-30% of full size)
- No embedding: Removes fonts entirely (not recommended β text may display incorrectly on systems without the font)
For a document using 50 characters from a 500 KB font, subsetting reduces the font contribution from 500 KB to approximately 50-100 KB.
Best Practices for Fonts
- Always subset fonts rather than removing them entirely
- Minimize the number of different fonts used in a document
- Use standard system fonts (Times, Helvetica, Courier) when possible β they do not need to be embedded
- Avoid decorative fonts unless necessary β they tend to be larger
PDF Linearization
Linearization (also called "web optimization" or "fast web view") reorganizes a PDF so the first page can be displayed before the entire file is downloaded. While it does not reduce file size, it significantly improves the perceived loading speed for web-hosted PDFs:
- Standard PDF: Browser must download the entire file before displaying any content
- Linearized PDF: First page displays while the rest downloads in the background
Linearization is especially valuable for large documents (reports, catalogs, manuals) that are frequently viewed online.
Additional Optimization Techniques
- Remove metadata: Strip unnecessary metadata, XMP data, and document properties
- Flatten form fields: Convert interactive form fields to static content if editing is no longer needed
- Remove hidden layers: Delete invisible layers and objects that increase file size
- Merge duplicate resources: Combine identical images and fonts that appear multiple times
- Remove bookmarks and links: If navigation features are not needed, removing them saves space
Batch Processing
When you need to compress many PDFs at once, batch processing saves significant time. After compressing, you can merge multiple PDFs into optimized combined documents.
Command Line with Ghostscript
# Compress a single PDF
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH \
-sOutputFile=output.pdf input.pdf
# Compression presets:
# /screen β 72 DPI (smallest, screen only)
# /ebook β 150 DPI (good balance)
# /printer β 300 DPI (high quality)
# /prepress β 300 DPI (production quality)
Batch Script
# Compress all PDFs in a directory
for file in *.pdf; do
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH \
-sOutputFile="compressed_${file}" "${file}"
done
For quick, one-off compression, use our PDF Compress tool directly in your browser β no software installation needed.
Key Takeaways
- Images account for 80-95% of PDF file size β optimizing them provides the biggest reduction
- Match image DPI to intended use: 72-150 for screen, 300 for print
- Always subset fonts rather than embedding them fully or removing them
- Linearize PDFs for web hosting to improve perceived loading speed
- Use batch processing with Ghostscript or online tools for multiple files
Related Tools
Frequently Asked Questions
How much can a PDF file be compressed?
Compression results vary depending on the content. Image-heavy PDFs can often be reduced by 50-90% by downsampling and recompressing images. Text-only PDFs may only shrink by 10-20%. Scanned documents typically see the largest reductions, often 70-90%, by applying proper image compression.
Does PDF compression reduce quality?
It depends on the method. Lossless compression (Flate/ZIP) reduces size without any quality loss. Lossy compression (JPEG) reduces image quality, but at moderate settings (quality 75-85%), the difference is imperceptible on screen. Text remains unaffected by compression. Choose the right balance based on your use case.
What is the best DPI for compressed PDFs?
For screen viewing and email sharing, 150 DPI offers the best balance of quality and file size. For standard printing, use 200-300 DPI. For web-only viewing, 72-96 DPI is sufficient. Never use higher DPI than necessary β it only increases file size without visible benefit for the intended use.
What is PDF linearization?
Linearization (or fast web view) reorganizes a PDF so the first page can display while the rest of the file continues downloading. It does not reduce file size but significantly improves the user experience when viewing PDFs in a web browser, especially for large documents.
Is it safe to compress PDFs online?
Browser-based PDF compression tools that process files entirely in your browser (client-side) are safe because your files never leave your device. Look for tools that explicitly state client-side processing. Avoid uploading sensitive documents to servers unless you trust the service provider's privacy policy.