Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 283
DaNet Avatar asked Feb 15 '12 15:02

DaNet


2 Answers

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).

like image 134
Alex K. Avatar answered Sep 28 '22 11:09

Alex K.


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 !

like image 40
Rahul Gupta Avatar answered Sep 28 '22 12:09

Rahul Gupta