Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this Ghostscript error message mean?

Tags:

ghostscript

I get this error message from a Ghostscript call:

Error: /syntaxerror in -file-
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--     2   %stopped_push   --nostringval--
  --nostringval--   --nostringval--   false   1   %stopped_push   1926   1   3   %oparray_pop   1925   1   3   %oparray_
pop   1909   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostr
ingval--   --nostringval--   --nostringval--   2   %stopped_push
Dictionary stack:
   --dict:1169/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--
Current allocation mode is local
Current file position is 215
GPL Ghostscript 9.05: Unrecoverable error, exit code 1

Does it mean that there is problem in the input Postscript file or does it mean something is wrong with my call or the installation?

The call was:

ps2pdf book.ps book.pdf

The input file book.ps exists in the current directory.

Is there a list of Ghostscript error messages and what they mean somewhere? (Google was not my friend in this case.)

like image 339
Kit Fisto Avatar asked Mar 28 '12 10:03

Kit Fisto


People also ask

What is a Ghostscript error?

"Error" means: there surely is a problem with the output, and Ghostscript will abort all further processing; the output is very likely not even a valid PDF. There are a lot of different methods to further debug the problem. But it is impossible to give any nail hitting advice if you don't see the files in question.

What is Ghostscript used for?

Ghostscript is an interpreter for PostScript™ and Portable Document Format (PDF) files. It is available both under the GNU GPL Affero license and for commercial licensing from Artifex. It has been under active development for over 20 years and has been ported to many different systems during this time.

How do I stop Ghostscript?

Closing the terminal will kill the shell running in the terminal, and pressing Ctrl + C in GhostScript will terminate GhostScript, and depending on the commands that follow will eventually also terminate the shell.

What is Ghostscript in Linux?

gs command invokes Ghostscript, which is an interpreter of Adobe Systems PostScript and Portable Document Format(PDF) languages. After executing Ghostscript it reads further input from the standard input stream until it encounters 'quit' command.


1 Answers

This is not a Ghostscript error message, its a PostScript error message. The PostScript error messages are defined in the PostScript Language Reference Manual. Syntaxerror means pretty much what it says, the PostScript program contained a syntax error.

Things you can try:

  1. Execute Ghostscript on the PostScript file to render the page, does it work ? (You don't say what OS you are suing but something like gs book.ps ought to work)

  2. Try using Ghostscript directly instead of the ps2pdf script which merely wraps it. Again something like gs -sDEVICE=pdfwrite -o book.pdf book.ps

One of these may help by either working or giving more explicit errors.

like image 197
KenS Avatar answered Oct 12 '22 12:10

KenS