减小 PDF 文件大小

the*_*ror 24 pdf macos

我拍了一些照片,并在 Omnigraffle (OSX) 上制作了一个巨大的 PDF。

现在我需要通过电子邮件发送该 PDF,但由于每张照片都是 5MB,因此文件很大。不过,当我通过电子邮件发送时,我不需要高分辨率照片。

那么什么程序将获取我的 PDF,将所有图像调整为低分辨率并保存?

Dan*_*eck 28

在 Preview 中打开 PDF,选择File » Save as...,然后选择名为Reduce File SizeQuartz Filter

在此处输入图片说明


使用ColorSync Utility微调滤镜。复制减少文件大小,然后更改设置。

我建议您首先尝试清除Image Sampling块中的所有值,但Resolution除外,它应该在 150-300 DPI 左右,具体取决于您要保存多少。

在此处输入图片说明


Mic*_*aël 18

灵感来自Max GlenisterMilan Kupcevic,感谢 Burgi,对示例脚本的解释:它使用电子书过滤器将 PDF 大小从大规模减少到小型

brew install ghostscript # aptitude work too if you do not have brew

compresspdf() {
    echo 'Usage: compresspdf [input file] [output file] [screen|ebook|printer|prepress]'
    gs -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -dPDFSETTINGS=/${3:-"screen"} -dCompatibilityLevel=1.4 -sOutputFile="$2" "$1"
}

compresspdf "Massive.pdf" "Small.pdf" ebook
Run Code Online (Sandbox Code Playgroud)

GS选项:

-dPDFSETTINGS=/screen   (screen-view-only quality, 72 dpi images)
-dPDFSETTINGS=/ebook    (low quality, 150 dpi images)
-dPDFSETTINGS=/printer  (high quality, 300 dpi images)
-dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs)
-dPDFSETTINGS=/default  (almost identical to /screen)
Run Code Online (Sandbox Code Playgroud)