PDF Compressor
Reduce PDF file sizes locally with structural optimization.
PDF Compressor shrinks PDF size on your device with three modes: Lossless re-saves optimized object streams (text stays selectable), Maximum re-renders every page as JPEG for the biggest wins on scans, and Smart tries lossless first then falls back to lossy when savings look thin. Quality and render-scale sliders let you trade file size against sharpness.
You see original size, mode explanations, and a before/after summary after compression. Processing uses pdf-lib for structural saves and PDF.js when pages must be rasterized — nothing uploads.
How it works
Lossless mode loads the document and saves with useObjectStreams enabled so redundant structures collapse without touching content streams as images. Typical savings land around 15–25% while keeping text selectable.
Lossy/Maximum draws each page through PDF.js at your chosen render scale onto a canvas, encodes JPEG at the quality slider, and rebuilds a PDF of those images — text becomes non-selectable. Smart runs lossless first and only switches to lossy when improvement is under about 20%. If the result would be larger than the input, the tool returns the original bytes instead of making the file worse.
How to use
- Open PDF Compressor and drop or click to add a PDF.
- Confirm filename and formatted size under Ready to Compress; use Change File to swap.
- Open Compression Options and choose Lossless, Smart (default), or Maximum.
- Read the mode info box — Smart and Maximum explain when text may stop being selectable.
- If shown, set Image quality (10–100%, default 70%) and Render scale (0.5×–3.0×, default 1.5×).
- Click Compress PDF; watch Compressing… or Rendering page X of Y for large files.
- On Compression Complete!, review orig → new size and percent saved.
- Download Compressed PDF (default compressed_name) or Start Over for another mode.
Tips
- Start with Smart — it picks lossless when that is enough and only rasterizes when needed.
- Use Maximum + lower quality for email-friendly scans; keep Lossless for contracts you must edit later.
- If savings are tiny, the document may already be optimized; try a different mode or crop margins first.
- Rasterized output is great for print previews but bad for search/copy — keep a lossless copy when text matters.
PDF Compressor FAQ
Are my files uploaded?
No. Compression runs in the browser with pdf-lib and PDF.js; nothing is sent to InBrowserKit.
What is the difference between Lossless and Maximum?
Lossless keeps text and vectors as real content (modest savings). Maximum renders pages as JPEG images (large savings, text no longer selectable).
Why did Smart choose lossy?
Smart only rasterizes when lossless savings are below about 20%. The result panel tells you which path ran.
Can compression make the file bigger?
If the optimized result is larger than the input, the original bytes are returned so you never regress.
Does this work on encrypted PDFs?
Encrypted or corrupt files may fail to load. Unlock them first with PDF Lock / Unlock.