How to Reduce PDF Size for Web: Optimise PDFs for Online Sharing
Learn how to reduce PDF file size specifically for web sharing — faster downloads, smaller email attachments, and better online performance.
Why Web PDFs Need Special Optimisation
A PDF optimised for print contains 300 DPI images — far more resolution than any screen can display. Sending that same file over the web wastes bandwidth, slows download times, and frustrates users on slow connections or mobile data.
Web-optimised PDFs target a different goal: smallest file size that still looks sharp on screens, loads quickly in browsers, and works in email attachments. This guide explains every lever you have to achieve that.
Understanding What Makes PDFs Large
Before compressing, identify what's actually causing the large file size. The main culprits are:
High-resolution images: A 300 DPI photo of an A4 page is about 2480 × 3508 pixels — far larger than any monitor. Downsampling to 96–150 DPI is invisible to screen readers but dramatically reduces size.
Embedded fonts: Full font embedding includes every glyph in the font file. A single professional typeface can add 500KB or more.
Embedded ICC colour profiles: Colour management profiles for print can add significant size.
Uncompressed or poorly compressed images: Images embedded as BMP or uncompressed TIFF are massive.
Duplicate objects: Some PDF generators embed the same image or resource multiple times.
Unused objects: Deleted content and objects that were removed from the document but remain in the file structure.
Target File Sizes for Web
Use these as guidelines:
| Document Type | Target Size |
|---|---|
| Text-only document (report, article) | Under 500KB |
| Document with a few images | Under 2MB |
| Brochure or image-heavy catalogue | Under 5MB |
| Ebook | Under 10MB |
| Technical manual with many diagrams | Under 15MB |
For email attachments, most providers accept up to 25MB, but staying under 5MB ensures reliable delivery everywhere.
Method 1: Ghostscript — The Most Powerful Free Tool
Ghostscript's /ebook setting is specifically designed for web and screen distribution.
gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.5 \
-dPDFSETTINGS=/ebook \
-dNOPAUSE -dBATCH -dQUIET \
-sOutputFile=output_web.pdf \
input.pdf
What /ebook does:
- Downsamples colour and greyscale images to 150 DPI
- Downsamples monochrome images to 300 DPI
- JPEG-compresses colour and greyscale images at Quality 80
- Compresses text and vector graphics streams
- Removes embedded ICC profiles where possible
- Enables fast web view (linearisation)
For even smaller files (lower quality):
-dPDFSETTINGS=/screen
This targets 72 DPI — acceptable for text-heavy documents but may make photos look soft.
Custom settings (fine-grained control):
gs -sDEVICE=pdfwrite \
-dColorImageResolution=96 \
-dGrayImageResolution=96 \
-dColorImageDownsampleType=/Bicubic \
-dColorImageFilter=/DCTEncode \
-c ".setpdfwrite <</ColorACSImageDict <</QFactor 0.76 /Blend 1 /HSamples [2 1 1 2] /VSamples [2 1 1 2]>> >> setdistillerparams" \
-dBATCH -dNOPAUSE \
-sOutputFile=output.pdf input.pdf
Method 2: Adobe Acrobat Pro — PDF Optimiser
Acrobat Pro's PDF Optimiser gives you detailed control over every optimisation parameter.
Access: File → Save as Other → Optimised PDF
Key settings to adjust:
Images Panel
- Colour and greyscale images: Downsample to 96 pixels/inch for screen display (150 for better quality)
- Compression: JPEG, Quality: Medium (60–70) for aggressive compression or High (80) for better quality
- Monochrome images: JBIG2 compression, 300 DPI
Fonts Panel
- Uncheck "Embed all fonts" if your document uses only standard fonts (Helvetica, Times, Courier)
- Enable "Subset embedded fonts when percent of characters used is less than: 100%" — this subsets all fonts
Transparency Panel
- Flatten transparency if the document has transparency effects (reduces processing overhead in some viewers)
Discard Objects Panel
Enable:
- Discard form submission, import and reset actions
- Discard JavaScript actions (if not needed)
- Discard embedded page thumbnails (viewers generate these automatically)
- Discard embedded print settings
- Discard private data of other applications
Clean Up Panel
Enable:
- Remove invalid bookmarks and links
- Use Flate to encode streams that are not encoded
- Remove embedded index
Method 3: Online Compression Tools
For quick, one-off compression without software:
Tools of PDF
Upload your PDF, select a compression level (light, medium, strong), and download the compressed file. Free, no account required. Useful for everyday documents.
Smallpdf
Strong compression with a clean interface. Free tier limits to 2 tasks per hour.
iLovePDF
Multiple compression levels available. Good batch compression support.
Limitation of online tools: You're limited to the compression presets they offer — no fine-grained control over exact DPI or quality. For precise optimisation, use Ghostscript or Acrobat Pro.
Method 4: Linearisation (Fast Web View)
Linearisation is a structural optimisation that lets browsers start displaying a PDF before it's fully downloaded — the first page appears almost instantly.
This doesn't reduce file size but dramatically improves perceived performance when embedding PDFs in websites or sharing links.
Enable in Acrobat Pro: File → Save as Other → Optimised PDF → check "Linearize" at the bottom.
Enable with Ghostscript:
gs -sDEVICE=pdfwrite -dFastWebView=true -o output.pdf input.pdf
Enable with qpdf:
qpdf --linearize input.pdf output.pdf
Verify linearisation: Open the PDF in a PDF analyser (PDF Analyser at pdf-online.com, or run qpdf --check input.pdf). It will confirm if fast web view is enabled.
Method 5: Image Pre-Processing Before PDF Creation
The most effective optimisation happens before you create the PDF:
Resize images at the source: If your original images are 6000 × 4000px, resize to 1200 × 800px before placing in your document. This is better than letting compression degrade a huge image.
Compress images separately: Use TinyPNG (tinypng.com) or Squoosh (squoosh.app) to compress images before placing them in Word/InDesign. These tools use modern compression algorithms (WebP, AVIF algorithms) that Ghostscript doesn't use.
Use JPEG for photos, PNG for graphics: JPEG is far more efficient than PNG for photographs. PNG is lossless and best for logos, diagrams, and screenshots with flat colours.
Method 6: Remove Unnecessary Elements
Before compressing, manually remove content that inflates file size:
- High-resolution logos — replace with web-resolution versions
- Hidden layers — flatten or delete hidden layer content
- Embedded videos or audio — remove if not needed for web viewing
- Attached files — PDFs can embed arbitrary files; remove if not needed
- Comments and annotations — flatten or remove before distribution
Verification: Check the Result
After compressing, verify:
- Text is still readable — zoom to 150% and check body text is sharp
- Images look acceptable — check the most important images at 100% zoom
- File opens and navigates correctly — click through all pages
- File size — compare to original; aim for 50–80% reduction for typical documents
- Text is selectable — if you accidentally rasterised the document, text won't be selectable
Summary
Web-optimised PDFs target 96–150 DPI images, JPEG compression at medium-to-high quality, font subsetting, and linearisation for fast loading. Ghostscript's /ebook preset handles most documents automatically. Acrobat Pro's PDF Optimiser gives the most control for specific requirements. Always verify the result looks acceptable at screen zoom — the goal is the smallest file that still looks professional. For best results, compress images at the source before creating the PDF rather than compressing an already-generated file.