我已经有大约20年没有手写Postscript了,所以我打开了Bluebook并将一些示例输入到名为test.ps的文件中。以下就是其中一个示例:
%!PS
/doACircle
{ 0 0 54 0 360 arc stroke } def
/doAnEllipse
{ 1 .75 scale
doACircle
stroke } def
300 500 translate doACircle
4 {0 −72 translate
doAnEllipse} repeat
showpage
我正在一个Debian Linux系统中使用Ghostscript和Imagemagick。它们之前的工作都很好。当我运行下面这个命令时:
convert test.ps test.png
我遇到了一个错误并且输出了一份转储:
Error: /undefined in �
Operand stack:
0
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1992 1 3 %oparray_pop 1991 1 3 %oparray_pop 1979 1 3 %oparray_pop 1833 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 3 --nostringval-- %repeat_continue --nostringval--
Dictionary stack:
--dict:727/1123(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)--
Current allocation mode is local
Current file position is 167
GPL Ghostscript 9.27: Unrecoverable error, exit code 1
Error: /undefined in �
Operand stack:
0
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1992 1 3 %oparray_pop 1991 1 3 %oparray_pop 1979 1 3 %oparray_pop 1833 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 3 --nostringval-- %repeat_continue --nostringval--
Dictionary stack:
--dict:727/1123(ro)(G)-- --dict:0/20(G)-- --dict:78/200(L)--
Current allocation mode is local
Current file position is 167
GPL Ghostscript 9.27: Unrecoverable error, exit code 1
convert-im6.q16: no images defined `test.png' @ error/convert.c/ConvertImageCommand/3258.
我知道我忘了某些基础内容 - 也许是与边界框相关的内容?