Keep getting error messages in ghostscript when using the documented ghostscript syntax

若如初见. 提交于 2021-02-07 01:54:24

问题


I am new to ghostscript and I cannot figure out the syntax. Whenever I try the simplest of commands ex -h or -? I get an error and I have tried them in all sorts of combinations.

    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

回答1:


You're inside the PostScript interpreter and what you're entering isn't PostScript.

You need to run the exe on the command line with -h (there are a couple of binaries in the distribution, one will respond correctly).




回答2:


What I tried is as follows:

The directory of Ghostscript installation on my system (the path to the file "gswin32c.exe"):

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

Then I opened windows command prompt (our normal command prompt window) and did this:

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

then..

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

there you go....

the help instructions got displayed, means everything was well and good !



来源:https://stackoverflow.com/questions/9296631/keep-getting-error-messages-in-ghostscript-when-using-the-documented-ghostscript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!