【发布时间】:2013-12-27 07:52:48
【问题描述】:
正如标题所说,我正在尝试将 png 转换为 pdf。 我在任何地方都找不到描述得很好的例子。
我用过这个命令
gs sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=test.pdf test.png
但我得到的只是
Error: /syntaxerror in (binary token, type=137)
Operand stack:
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop 1771 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push
Dictionary stack:
--dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)--
Current allocation mode is local
GPL Ghostscript 9.07: Unrecoverable error, exit code 1
此错误消息。现在我开始考虑在ghostscript中是否可以使用这样的功能。我应该使用其他软件吗? ** 我运行的是最新的 9.07 版本
【问题讨论】:
-
我一直使用 imagemagick:convert thisfile.png thisfile.pdf
-
好吧,最新版本的 Ghostscript 是 9.10,但是根据我的个人经验,我在您使用的版本上遇到了一些问题,并且使用 9.06 版本解决了这些问题,这对我来说比 9.07 甚至更稳定9.10
-
哦,好的 9.07 是自制软件中的最新可用版本。谢谢!
标签: pdf ghostscript