使用记录的ghostscript语法时,不断收到ghostscript错误消息。

10

我是ghostscript的新手,不太理解语法。每当我尝试最简单的命令,例如-h或-?时,都会出现错误,我已经尝试了各种组合。

    GPL Ghostscript 9.05 (2012-02-08)
Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.

GS>-h
Error: /undefined in -h
Operand stack:

Execution stack:
  %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue   --n
ostringval--   --nostringval--   false   1   %stopped_push   .runexec2   --nostr
ingval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval
--
Dictionary stack:
   --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 3


GS>gs-h
Error: /undefined in gs-h
Operand stack:

Execution stack:
  %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-
-   2   %stopped_push   --nostringval--   --nostringval--   %loop_continue   --n
ostringval--   --nostringval--   false   1   %stopped_push   .runexec2   --nostr
ingval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval
--
Dictionary stack:
   --dict:1166/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Current file position is 5

你是怎么复制这段文本的?我不能使用右键。 - Ooker
2个回答

9

您正在PostScript解释器内输入的内容不是PostScript。

您需要在命令行上使用-h运行exe文件(分发中有几个二进制文件,其中一个会正确响应)。


不确定我是否理解,您是指ghostscript安装中lib文件夹内的cmd文件吗?例如:ps2pdf.cmd -h - DaNet
2
你应该能够运行 gswin32c.exe -h。 - Alex K.
1
谢谢你,Alex!你帮了我大忙! - DaNet
有没有想法在Linux中如何做到这一点?我无法弄清楚如何在后置解释器之外打开ghostscript。 - Hee Jin

8

我尝试的方法如下:

在我的系统上 Ghostscript 安装目录(文件“gswin32c.exe”的路径)为:

C:\Program Files (x86)\gs\gs9.10\bin

然后我打开了 Windows 命令提示符(我们通常使用的命令提示符窗口)并执行了以下操作:

C:\>cd C:\Program Files (x86)\gs\gs9.10\bin

然后是...

C:\Program Files (x86)\gs\gs9.10\bin>gswin32c.exe -h

这样就好了....

帮助指令被显示出来,说明一切都很好!


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接