3

I'm led to believe that it's possible to output from Ghostscript to SVG, as described on this blog post:

gs -dBATCH -dSAFER -dNOPAUSE -sDEVICE=svg -sOutputFile=Logo.svg Logo.pdf

However, I just get "Unknown device: svg"

I am using Ghostscript 9.06

My question is: where do I get the svg device, and how do I install it? (Red Hat x64)

So far I have tried googling (many dead ends but no real mention of this output device) and looking on the Ghostscript website.

4

2 回答 2

5

如果你做 gs -? 使用情况将为您提供可用设备的列表。大概您的构建不包含 svg 设备,在这种情况下,您将需要重建包含该支持的可执行文件。

于 2013-08-21T12:19:08.010 回答
1

我确实有svg我可用的设备之一。它的输出与您预期的略有不同。具体来说,它将文件发送到标准错误而不是您修改的输出文件。对于特殊情况,像这样设置你的命令行:

gs -dBATCH -dSAFER -dNOPAUSE -sDEVICE=svg Logo.pdf 2>Logo.svg

您可能或可能想要查看-q标志,这将抑制通常的标准输出。

于 2016-07-26T17:57:30.993 回答