0
votes

I have been converting PDF's to TIFF files using our imaging server without any problem. We upload a PDF via a web interface to our server and the erez imaging server converts to TIFF files for us. I have just recently been getting an error from ghostscript as follows:

GS output: Error: /invalidrestore in --restore-- GS output: Operand stack: GS output: --dict:12/21(L)-- --nostringval-- --nostringval-- --nostringval-- GS output: Execution stack: GS output: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1846 1 3 %oparray_pop 1845 1 3 %oparray_pop 1829 1 3 %oparray_pop --nostringval-- 1775 2 4 %oparray_pop --nostringval-- 1759 2 4 %oparray_pop --nostringval-- --nostringval-- 1775 3 4 %oparray_pop --nostringval-- 1759 3 4 %oparray_pop --nostringval-- GS output: Dictionary stack: GS output: --dict:1159/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- GS output: Current allocation mode is local GS output: Last OS error: 2 GS Error: GPL Ghostscript 8.70: Unrecoverable error, exit code 1

Here is the ghostscript config:

    <parameter value="-r220"/> <!-- controls resolution. For example -r144 means 144 DPI -->    
    <parameter value="-dQUIET"/>
    <parameter value="-dSAFER"/>
    <parameter value="-dBATCH"/>
    <parameter value="-dNOPAUSE"/>
    <parameter value="-dNOPROMPT"/>
    <parameter value="-sDEVICE=tiff24nc"/>
    <parameter value="-dUseCIEColor"/>
    <parameter value="-dTextAlphaBits=4"/>
    <parameter value="-dGraphicsAlphaBits=4"/>
    <parameter value="-dEPSCrop"/>

It is a Linux Ubuntu OS.

This really doesn't mean anything to me, and there doesn't seem to be much help on the internet. If any body can shed some light on what the error means we may be able to start diagnosing the problem.

Many thanks, Pat

2
the version of Ghostscript you're using seems to be 8.70. That's quite a few years old... I'd recommend you try the latest version, 9.02, available at downloads.ghostscript.com .Kurt Pfeifle

2 Answers

1
votes

There are two possibilitiesl a bug in Ghostscript, or a buggy PDF file.

Without seeing the PDF file its difficult to make any judgements. The first thing I would try is using a newer version of Ghostscript, the current version is 9.02 with 9.03 due to ship in a couple of months.

If that also gives you an error, then your best bet is probably to raise a bug report in the Ghostscript bug tracker at http://bugs.ghostscript.com. You will need to supply a sample file as well as the GS version and command line.

You seem to suggest that you are using erez to convert the PDF to TIFF so perhaps you could also raise the error with them.

0
votes

I Convert the PDF file to Tiff File by Ghostscript with Java on ubuntu.
snippets code :

String convertCommand = "gs -dNOPAUSE -q -sDEVICE=tiff24nc -sCompression=lzw -dBATCH -sOutputFile=" + outputFile + " " + sourceFile;
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec(convertCommand);
pr.waitFor();

If you want compression then simply replace command to,
String convertCommand = "gs -dNOPAUSE -q -sDEVICE=tifflzw -dBATCH -sOutputFile=" + outputFile + " " + sourceFile;

Please install Ghostscript before using it,
1. sudo apt-get install ghostscript libtiff-tools