【问题标题】:How to compress PDF when creating from GIF files?从 GIF 文件创建时如何压缩 PDF?
【发布时间】:2021-01-09 22:53:30
【问题描述】:

我有大约 200 个 gif 黑白文件,每个 600-900 Kb。总大小约为 102 Mb。 我从他们创建 pdf -

convert *.gif result.pdf

result.pdf 文件大小约为 98 Mb。但我需要一个小于 25 Mb 的 PDF 文件。 我尝试了不同的选项 - 压缩、质量、密度 - 但它们都没有帮助。

我还能尝试什么?

【问题讨论】:

  • 我不知道您是否可以压缩PDF。但是您可以通过使用 +dither -colors N 减少其中包含的颜色数量来“压缩”输入 GIF。或者创建颜色映射图像并使用 -remap。见imagemagick.org/Usage/quantize/#remapimagemagick.org/Usage/quantize/#colors
  • @fmw42,图像是黑白的.. upd。嗯,但存储为 RGB
  • 也许将 GIFS 转换为 FAX 或 GROUP4 压缩 TIFF。试试convert *.gif -compress FAX -type bilevel -format tiff:- | convert - result.pdf
  • @fmw42,convert: missing an image filename tiff:-'@error/convert.c/ConvertImageCommand/3223。转换:此图像格式没有解码委托 ' @ error/constitute.c/ReadImage/566. convert: no images defined result.pdf' @error/convert.c/ConvertImageCommand/3226`
  • 我的命令对我来说很好用。你输入了什么?您是否包含了管道 | 符号并将我的命令作为一个命令,而不是两个?你从convert -version 得到什么?发布一张典型的 GIF 图片

标签: pdf imagemagick pdf-generation gif macos-mojave


【解决方案1】:

试试

convert 150_orig.gif -compress FAX -type bilevel tiff:- | convert - result.pdf

这会将文件大小从 613448B 减少到 157477B。

【讨论】:

    猜你喜欢
    • 2013-12-28
    • 1970-01-01
    • 2010-12-19
    • 2015-05-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-05
    • 1970-01-01
    相关资源
    最近更新 更多