Ps2pdf: Unrecoverable error

Good Day all,

I'm new to ghostscript and have installed it in my unix system two days back.

But while using ps2pdf, I get the error pasted at the bottom.

I was able to convert my PS file via PDF Creator manually. But this error seems to be coming while using ps2pdf. My PS File is having both read and write access.

Can you please help me. Had gone through several sites, but couldn't find anything related to this error. Please let me know if you need more details.

Any help is really appreciated.

 
 which gs
/usr/local/bin/gs
 

command I used: ps2pdf RFLABEL30.ps test5.pdf

Error:

  
 Unrecoverable error:  ]%%; OffendingCommand: %%[ Error: :
While reading Can't find (or open) initialization file r%stdin
r%stdinr/dev/tty
w%stdout
54.0>>showpage, press <return> to continue<<
r><GSr%statementedit  ?�
          ^B+^B^[^B^U^B^U^B^U^B^A^A�^A@^A�@@^E�$�@^K�x@^K��`@^D�� �^\ht (@^K��
@^K��@^K�@^L^Yx@^L2Q@^L5h@^LA*@^K�x@^K��^A@^L=�
% @^L5h^H0@^K��@^L=�@^L5h@^LA*@^K��@^E�$�@^K��@^K��`@^D�� �D exp@^K�@^K�^P@^K�^
P@^K��@^K��@^K��@^K��@^K68@^K�se a@^K�^P@^K��@^K��@^K�^P@^E�$^[�@^K�`@^K��^[�@^
D�� �Ds ex@^K�^Psly ^D^Pnder�^H^[`@^De of ^[`  D@^E�@^De^F@^E�@^E$�^A^A^C^X
 ^A^A^A^A   ^W�^^*D^YDFD4D4D4D4^A^A@^EG@^EG�@^EG@^Esb@^E`^Z@^E>J@^Esj@^Esr@^E:
2@^E::@^Esz@^E>*@^Es�@^Es�@^E>j@^E>r@^Es�@^Es�@^E8*@^E>z@^E>�@^E>�@^E7@^E<�@^E:
�@^E>�@^E>�@^Es�@^Es�@^Es@^E>�@^E>@^E>@^E>@^E>@^E>�@^E>@^Es@^E:@^E>�@^Es
@^E>@^E>�@^E?^B@^E?
@^Es@^E<z@^EH@^Df0test1.pdf@^LC�@
^L�@
 �^B^BA >O��?�?�^A?�dz  ?�?��^H^H?�@^Eg�@^E(@^E(^R^R^P^P?*?*^A   ^K^A^B^A^A^G�
 ^A^A^A@        �(^A    @       ��?^B^A `\H@& ^A@       ^H^A    @
x?^B^A `\H@&     @
�?^B^A `�^A,@/�^A^Ad^A?�333333    ^A^A^A^A^A^A^A^A^A                /tmp/gs_a10
625w��/tmp/gs_b10625w��@
^Ax@

First, could you edit your post and put code tags around your listings, please - it makes them easier to read.

Second, have you tried to view the file with gs ?

Also, which version of Unix are you using, and how did you install GhostScript? Via a package manager, tarball or zip file with binaries, or from source?

It looks to me as though your GhostScript installation has not included all the initialisation files.

Andrew

Thanks for the response Andrew. I installed ghostscript 7.05 source code from

gnu.org / pub / gnu

Unix version : HP-UX gbaheu53 B.11.11 U 9000/800 1193201791 unlimited-user license

I have tried to view the ps file using the below command. But DEVICE display is not available.

 $ gs -sDEVICE=display RFLABEL30.ps  

I downloaded the GS package and transferred (binary mode) it to unix via cmd. Then it was extracted using command

 $ gtar zxvf 

Same was done for 3rd party libraries JPEG, LIBPNG, ZLIB. Then it was configured via the command

 $ configure 

and installed via

 $ make install 

How will I able to find out which is the init file missing. While googling. most of the init file missing cases were for gs_init.ps. But this file is available in the directory /home/mbsysop/ghostscript-7.05/lib.

Can you please help.

Please try

gs  RFLABEL30.ps

without the display option.

Also type

gs --help

and paste the output here. Right at the end is the search path. Make sure the path you had, /home/mbsysop/ghostscript-7.05/lib , is in that path.

Andrew

Hi Andrew,

Output for gs RFLABEL30.ps is pasted below. Gets message "display device is not defined". But display device is defined as pdfwrite in ps2pdf script in /usr/local/bin. I tried to export the sDEVICE=pdfwrite. But didn't work.

 18 /home/mbsysop/ghostscript-7.05/lib>gs RFLABEL30.ps
GNU Ghostscript 7.05 (2002-04-22)
Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GNU Ghostscript 7.05: Cannot open X display `(null)'.
**** Unable to open the initial device, quitting.

Output for gs --help

 
  
 GNU Ghostscript 7.05 (2002-04-22)
Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
Most frequently used switches: (you can use # in place of =)
 -dNOPAUSE           no pause after page   | -q       `quiet', fewer messages
 -g<width>x<height>  page size in pixels   | -r<res>  pixels/inch resolution
 -sDEVICE=<devname>  select device         | -dBATCH  exit after last file
 -sOutputFile=<file> select output file: - for stdout, |command for pipe,
                                         embed %d or %ld for page #
Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PDF
Available devices:
   x11 x11alpha x11cmyk x11gray2 x11gray4 x11mono bmpmono bmpgray bmpsep1
   bmpsep8 bmp16 bmp256 bmp16m bmp32b deskjet djet500 laserjet ljetplus
   ljet2p ljet3 ljet3d ljet4 ljet4d lj5mono lj5gray cdeskjet cdjcolor
   cdjmono cdj550 pj pjxl pjxl300 uniprint ijs bj10e bj200 bjc600 bjc800
   faxg3 faxg32d faxg4 pcxmono pcxgray pcx16 pcx256 pcx24b pcxcmyk pbm
   pbmraw pgm pgmraw pgnm pgnmraw pnm pnmraw ppm ppmraw pkm pkmraw pksm
   pksmraw tiffcrle tiffg3 tiffg32d tiffg4 tifflzw tiffpack tiff12nc
   tiff24nc psmono psgray psrgb bit bitrgb bitcmyk png16m pnggray pngmono
   png256 png16 jpeg jpeggray pdfwrite pswrite epswrite pxlmono pxlcolor
   cljet5 cljet5c nullpage
Search path:
   . : /usr/local/share/ghostscript/7.05/lib :
   /usr/local/share/ghostscript/fonts
For more information, see /usr/local/share/ghostscript/7.05/doc/Use.htm.
Report bugs to bug-gs@ghostscript.com, using the form in Bug-form.htm.

 

gs_init.ps is available in the search path

 /usr/local/share/ghostscript/7.05/lib 

Does this have something to do with

 /dev/tty 

as shown in the error message?

Also, can you please tell me what you meant by "Make sure the path you had, /home/mbsysop/ghostscript-7.05/lib, is in that path"

The search path /usr/local/share/ghostscript/7.05 does not have all the subdirectories as in the path /home/mbsysop/ghostscript-7.05. Is this an issue ?

  
 6 /usr/local/share/ghostscript/7.05>ll
total 16
drwxrwxrwx   2 root       sys           2048 Sep  3 12:52 doc
drwxrwxrwx   3 root       sys           1024 Sep  3 12:52 examples
drwxrwxrwx   2 root       sys           5120 Sep  6 15:00 lib

 

"cannot open X display" means it can't contact your GUI.

Hi Corona,

But I'm not getting this error while using ps2pdf utility. sDEVICE is set to pdfwrite in ps2pdfwr script.

Main issue is why I'm getting the error I posted at the beginning of this thread while using ps2pdf. I'm I missing any initialization files as described in the error. How can I figure that out.

Any help is appreciated

Sanyo

Probably because it doesn't use your GUI.

The goal here is to open that ps file in gs and view it, to see whether the problem lies in gs or elsewhere.

ps2pdf is a wrapper around gs . As Corona688 says we are trying to establish where the fault lies - with gs itself or the wrapper. So how are you connecting to the Unix system? I just assumed you were logging onto the console and using the X server. Are you telnetting in from a Windows machine? Are you using an SSH client such as PuTTY ?

Andrew