Skip to content
cosmodev ~/tools/pdf-compress

PDF 压缩

Images & Media

在浏览器中缩小 PDF 文件体积 — 无损优化外加用于内嵌图像的 JPEG 质量滑块。无需上传任何内容。

This tool's interactive UI hasn't been wired up yet.

(文档为英文)

What it does

Shrinks a PDF in two passes, entirely in your browser. A lossless pass always runs (object-stream serialization plus a metadata strip). When you lower the quality slider below 1.00, embedded JPEG images are decoded and re-encoded at that quality — the usual win for photo-heavy files. Nothing uploads.

How to use

  1. Drop a PDF onto the drop zone. Its page count and size show on the file row.
  2. Pick an image quality between 0.60 and 1.00. 1.00 runs the lossless pass only.
  3. Press Compress. The summary shows total before/after and a per-image accounting.
  4. Press Download compressed PDF to save the result.

Examples

  • A 12 MB scanned brochure at quality 0.80 — each scanned page is one large JPEG, so the slider dominates: typically a large reduction.
  • An exported report that is all text and vectors: the lossless pass re-serializes it; the size moves a little or not at all.
  • A PDF whose images are PNG-style (FlateDecode): they are listed as “kept — not a JPEG image” and stay byte-for-byte.

Good to know

  • Text, vectors, and fonts are never re-encoded — the slider affects embedded JPEG images only, at their original pixel dimensions.
  • Images that would grow (or barely change) are kept as-is and listed as such; a corrupt embedded image is skipped, never fatal.
  • Already-optimized PDFs may not shrink; the tool says so honestly instead of pretending.
  • Password-protected PDFs need unlocking first — you will see a clear error.
源代码14 种语言

100% 客户端运行 · 你的数据永远不会离开浏览器。 觉得好用?分享给同事吧。