2009-04-24 95 views

回答

34

由于问题是关于“最低参数传递给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 ........大致相同的设置,如Adobe Distiller中使用的“屏幕”与有以下区别:
  • -r720x720 ..................................分辨率:720 dpi(位图/字体需要转换为位图)
  • -dColorConversionStrategy=/LeaveColorUnchanged ...(Distiller中的 “屏幕” 采用=/sRGB
  • -dCompatibilityLevel=1.4 ....(Distiller中的 “屏幕” 采用=1.3
  • -dEmbedAllFonts=true [*] .........(Distiller中的 “屏” 使用=false
  • -dOptimize=false [**] ...............(Distiller中的“屏幕”采用=true
  • -dDownsample{Color,Gray,Mono}Images=false ...(Distiller中的 “屏幕” 采用=true

[*]默认情况下,Ghostscript的没有嵌入古典“基地14” -PostScript字体。为了执行该操作,请使用额外的参数(在命令行的末尾!),如-c "<</NeverEmbed [ ]>>setdistillerparams" -f c:/path/to/input.pdf
Ghostscript's pdfwrite设备在第一次写入时无法“优化”PDF。为了优化,你必须再次调用Ghostscript第二遍,使用特殊参数(你也可以尝试-dOptimize=true)。

顺便说一句,Ghostscript的最新版本是8.71,可在这里找到:ghostscript.com/relases

+3

谢谢,您为我节省了不少时间。不幸的是,你的不是选定的答案。 – David 2012-04-05 19:07:36

5

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

+1

你说什么,不一定是真的(但对某些人还是有帮助的)。这完全取决于您在安装时选择的内容。安装Ghostscript时,用户(或其管理员)可能选择了非默认路径或驱动器d:。在德语安装中`c:\ programme files`是`c:\ programme`。但是你可以通过说:*通常,Ghostscript版本安装到`%programfiles%\ gs \ gs#。## \ *`*。因为%programfiles%是一个环境变量,它指向所有语言环境的缺省insta路径,无论是`c:\ program files`还是`d:\ programme` ... – 2010-08-11 16:54:49

相关问题