剛剛安裝了適用於Windows的Ghostscript 8.54。將EPS轉換爲PDF的Ghostscript命令行參數
有誰知道最小的參數傳遞給gswin32c.exe
使其轉換,也就是說,someFile.eps到someFile.eps.pdf?
剛剛安裝了適用於Windows的Ghostscript 8.54。將EPS轉換爲PDF的Ghostscript命令行參數
有誰知道最小的參數傳遞給gswin32c.exe
使其轉換,也就是說,someFile.eps到someFile.eps.pdf?
由於問題是關於「最低參數傳遞給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。
在Windows下,ps2pdf和其他實用程序位於C:\Program Files\gs\gs#.##\lib
中,作爲.bat和.cmd文件。這不是很明顯,特別是如果你正在尋找.exe文件。
你說什麼,不一定是真的(但對某些人還是有幫助的)。這完全取決於您在安裝時選擇的內容。安裝Ghostscript時,用戶(或其管理員)可能選擇了非默認路徑或驅動器d:。在德語安裝中`c:\ programme files`是`c:\ programme`。但是你可以通過說:*通常,Ghostscript版本安裝到`%programfiles%\ gs \ gs#。## \ *`*。因爲%programfiles%是一個環境變量,它指向所有語言環境的缺省insta路徑,無論是`c:\ program files`還是`d:\ programme` ... – 2010-08-11 16:54:49
謝謝,您爲我節省了不少時間。不幸的是,你的不是選定的答案。 – David 2012-04-05 19:07:36