22

刚刚为 Windows 安装了 Ghostscript 8.54。

有谁知道传递给gswin32c.exe它以使其转换的最小参数,例如someFile.epssomeFile.eps.pdf

4

2 回答 2

36

由于问题是关于“传递给 gswin32c.exe 以使其将 someFile.eps 转换为 someFile.eps.pdf 的最小参数”,让我给出一个答案:

  c:/path/to/gswin32c.exe ^
    -sDEVICE=pdfwrite ^
    -o c:/path/to/output.pdf ^
    c:/path/to/input.eps

甚至更短:

  gswin32c ^
    -sDEVICE=pdfwrite ^
    -o output.pdf ^
    input.eps

这将使用 Ghostscript 的内置默认参数。在我看来,最新版本的 Ghostscript 最重要的是:

  • -dPDFSETTINGS=/default........ 与 Adob​​e Distiller 用于“屏幕”的设置大致相同,但有以下区别:
  • -r720x720.....................分辨率:720 dpi(需要转换为位图的位图/字体)
  • -dColorConversionStrategy=/LeaveColorUnchanged...(蒸馏器的“屏幕”使用=/sRGB
  • -dCompatibilityLevel=1.4....(蒸馏器的“屏幕”使用=1.3
  • -dEmbedAllFonts=true[*]…………(蒸馏器的“屏幕”使用=false
  • -dOptimize=false[**] ................(蒸馏器的“屏幕”使用=true
  • -dDownsample{Color,Gray,Mono}Images=false...(蒸馏器的“屏幕”使用=true

[*] 默认情况下,Ghostscript 不嵌入经典的“Base 14” -PostScript 字体。要强制执行此操作,请使用额外参数(在命令行末尾!),例如-c "<</NeverEmbed [ ]>>setdistillerparams" -f c:/path/to/input.pdf.
[**] Ghostscript 的pdfwrite设备在第一次编写 PDF 时无法“优化”它。要进行优化,您必须使用特殊参数再次调用 Ghostscript 进行第二次传递(您也可以尝试-dOptimize=true)。

顺便说一句,Ghostscript 的最新版本是 8.71,可在此处获得:ghostscript.com/relases

于 2010-08-11T17:36:24.310 回答
5

在 Windows 下,ps2pdf 和其他实用程序位于C:\Program Files\gs\gs#.##\lib.bat 和 .cmd 文件中。这不是很明显,特别是如果您正在寻找 .exe 文件。

于 2010-08-10T17:52:33.760 回答