Ghostscript命令行参数将EPS转换为PDF [英] Ghostscript command line parameters to convert EPS to PDF

查看:1748
本文介绍了Ghostscript命令行参数将EPS转换为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚安装Ghostscript 8.54 Windows。



有没有人知道要传递到 gswin32c.exe 的最低参数,以使其转换,例如 someFile.eps someFile.eps.pdf


解决方案

是关于传递给gswin32c.exe的最小参数,以使它转换,例如someFile.eps到someFile.eps.pdf,让我给一个答案:

  c:/path/to/gswin32c.exe ^ 
-sDEVICE = pdfwrite ^
-oc :/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的screen c $ c> = / sRGB )

  • -dCompatibilityLevel = 1.4 screenusing = 1.3

  • -dEmbedAllFonts = true [*] .........(Distiller'sscreenuses = false

  • -dOptimize = false [**] ...............(Distiller的screen使用 = true

  • -dDownsample {Color,Gray,Mono} Images = false ...(Distiller'sscreenuses = true



[*]默认情况下,Ghostscript不嵌入经典Base 14 - PostScript字体。要强制执行,请使用 -c<< / NeverEmbed []>>> setdistillerparams-fc:/ path / to / input.pdf

[**] Ghostscript的 pdfwrite 设备在撰写PDF时无法优化第一次。要优化,你必须再次调用Ghostscript第二遍,使用特殊的参数(你也可以尝试 -dOptimize = true )。



BTW,Ghostscript最新版本为8.71,可在此处查看: ghostscript.com / relases


Just installed Ghostscript 8.54 for Windows.

Does anyone know of the minimum parameters to pass to gswin32c.exe to make it convert, say, someFile.eps to someFile.eps.pdf?

解决方案

Since the question was about the "minimum parameters to pass to gswin32c.exe to make it convert, say, someFile.eps to someFile.eps.pdf", let me give an answer:

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

or even shorter:

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

This will use the builtin, default parameters for Ghostscript. The most important of which, from the top of my head, for the most recent version of Ghostscript are:

  • -dPDFSETTINGS=/default ........ roughly the same settings as Adobe Distiller uses for "screen" with the following differences:
  • -r720x720 .................................. resolution: 720 dpi (bitmaps/fonts requiring conversion to bitmap)
  • -dColorConversionStrategy=/LeaveColorUnchanged ... (Distiller's "screen" uses =/sRGB)
  • -dCompatibilityLevel=1.4 .... (Distiller's "screen" uses =1.3)
  • -dEmbedAllFonts=true [*]......... (Distiller's "screen" uses =false)
  • -dOptimize=false [**] ............... (Distiller's "screen" uses =true)
  • -dDownsample{Color,Gray,Mono}Images=false ... (Distiller's "screen" uses =true)

[*] By default, Ghostscript does not embed the classical "Base 14"-PostScript fonts. To enforce that, use an extra parameter (at the end of the command line!) like -c "<</NeverEmbed [ ]>>setdistillerparams" -f c:/path/to/input.pdf.
[**] Ghostscript's pdfwrite device cannot "optimize" a PDF when it is writing it the first time. To optimize, you have to call Ghostscript again for a second pass, using special parameters (you may also try -dOptimize=true).

BTW, Ghostscript's most recent version is 8.71, available here: ghostscript.com/relases.

这篇关于Ghostscript命令行参数将EPS转换为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆