2

In our module we are using the ghost script to compress PDF of higher size to lower size use the command

gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 
   -sOutputFile=output.pdf input.pdf

while converting this we are getting an error as shown below

GPL Ghostscript 9.10: Unrecoverable error, exit code 1GPL Ghostscript 9.10: ERROR -12 closing pdfwrite device. See gs/psi/ierrors.h for code explanation

More Information:
we are using Ubuntu 14.04 OS.

Thanks,
Praveen Ravipati

Ravipati Praveen
  • 446
  • 1
  • 7
  • 28
  • 1
    You should first upgrade to a newer version of Ghostscript, the current version is 9.16. I'd strongly recommend that you build it from source, at least for the purposes of testing. If the problem persists then you should open a bug report. Do not forget to attach the **input** file to the bug report. FWIW -12 is an ioerror. So probably somehting else is wrong. – KenS Jun 29 '15 at 13:24
  • Thanks KenS, I found the cause of the issue. I verified the tmp directory while compressing the PDF . it taking the huge space and at some point of time tmp space is not enough to compress. So this is throwing io error. So to fix this i added extra space for tmp directory. then I checked again.It is fine – Ravipati Praveen Jul 27 '15 at 11:47

1 Answers1

1

Thanks KenS, I found the cause of the issue. I verified the tmp directory while compressing the PDF . it taking the huge space and at some point of time tmp space is not enough to compress. So this is throwing io error. So to fix this i added extra space for tmp directory. then I checked again.It is fine

Ravipati Praveen
  • 446
  • 1
  • 7
  • 28