19

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

Kit Fisto
  • 4,385
  • 5
  • 26
  • 43

1 Answers1

11

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.

Muhammad Hassaan
  • 7,296
  • 6
  • 30
  • 50
KenS
  • 30,202
  • 3
  • 34
  • 51
  • 1
    Thank you KenS. Both trials lead to the same error message. So I assume, the PostScript file is corrupt. It was created from Adobe FrameMaker 10 when I tried to save a large book as PDF. I have already tried the usual things like converting to current version, optimizing the files, printing instead of saving etc. Any idea what I can do? – Kit Fisto Mar 30 '12 at 07:37
  • If you can make the file public I can look at it for you. You can email it to 'ken at spamcop dot net' if its of a reasonable size (or send me email with a link). I can't really offer any help without seeing the file I'm afraid. It may be a problem in the file or a Ghostscript bug, no way to tell without seeing the PostScript program. – KenS Mar 31 '12 at 07:57