Ps2pdf: Unrecoverable error

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Ps2pdf: Unrecoverable error
# 1  
Old 09-05-2017
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.
Code:
 
 which gs
/usr/local/bin/gs

command I used: ps2pdf RFLABEL30.ps test5.pdf

Error:
Code:
  
 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@^E═H@^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@


Last edited by vbe; 09-05-2017 at 05:43 AM.. Reason: code tags
# 2  
Old 09-05-2017
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
# 3  
Old 09-06-2017
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.

Code:
 $ 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

Code:
 $ gtar zxvf



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

Code:
 $ configure



and installed via

Code:
 $ 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.


Last edited by ADHVADARZIN; 09-06-2017 at 10:00 AM..
# 4  
Old 09-06-2017
Please try
Code:
gs  RFLABEL30.ps

without the display option.

Also type
Code:
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
# 5  
Old 09-06-2017
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.

Code:
 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

Code:
 
  
 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
Code:
 /usr/local/share/ghostscript/7.05/lib

Does this have something to do with
Code:
 /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 ?

Code:
  
 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


Last edited by ADHVADARZIN; 09-06-2017 at 11:11 AM..
# 6  
Old 09-06-2017
"cannot open X display" means it can't contact your GUI.
# 7  
Old 09-06-2017
Quote:
Originally Posted by Corona688
"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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Rpcinfo: can't contact portmapper: RPC: Authentication error; why = Failed (unspecified error)

I have two servers with a fresh install of Solaris 11, and having problems when doing rpcinfo between them. There is no firewall involved, so everything should theoretically be getting through. Does anyone have any ideas? I did a lot of Google searches, and haven't found a working solution yet. ... (2 Replies)
Discussion started by: christr
2 Replies

2. UNIX for Dummies Questions & Answers

> 5 ")syntax error: operand expected (error token is " error

im kinda new to shell scripting so i need some help i try to run this script and get the error code > 5 ")syntax error: operand expected (error token is " the code for the script is #!/bin/sh # # script to see if the given value is correct # # Define errors ER_AF=86 # Var is... (4 Replies)
Discussion started by: metal005
4 Replies

3. UNIX and Linux Applications

Creating pdf with bookmarks using ps2pdf ??

Hello to all, I have a *.ps file, which needs to be converted to a pdf file. The file is huge & i would like it to have bookmarked according to main titles (already provided). What is the option used in ps2pdf command, that will generate bookmarks from a *.ps file ? Kindly help. Thanks. ... (0 Replies)
Discussion started by: frozensmilz
0 Replies

4. Shell Programming and Scripting

Need help on ps2pdf

Hi, Iam trying to convert a .ps file to pdf in unix. iam using the command like ps2pdf my_file.ps my_file.pdf it is working in server1. if i execute the same in another (server2), its not working.. So i have downloaded the ps files (ps2pdf,ps2pdfwr,ps2pdf14,ps2pdf13,ps2pdf12,gs... (2 Replies)
Discussion started by: Pradeep Garine
2 Replies

5. AIX

nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error

-------------------------------------------------------------------------------- Hello, help me please. I am trying to create a mksysb bakup using nim. I am geting this error, how to correct it ? : Command : failed stdout: yes stderr: no... (9 Replies)
Discussion started by: astjen
9 Replies

6. UNIX for Dummies Questions & Answers

awk Shell Script error : "Syntax Error : `Split' unexpected

hi there i write one awk script file in shell programing the code is related to dd/mm/yy to month, day year format but i get an error please can anybody help me out in this problem ?????? i give my code here including error awk ` # date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies

7. Solaris

Print to ps2pdf print queue

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (2 Replies)
Discussion started by: Sean_69
2 Replies

8. UNIX for Dummies Questions & Answers

Print to a ps2pdf print queue.

I am trying to create a printer queue, on a SunOS 5.7 system, that outputs a pdf file. There is an application running on the system that has a print button, which sends print files to the default printer. If I disable the printer, I am able to manually capture the files in /var/spool/lp/tmp and... (1 Reply)
Discussion started by: Sean_69
1 Replies

9. UNIX for Dummies Questions & Answers

Error: Internal system error: Unable to initialize standard output file

Hey guys, need some help. Running AIX Version 5.2 and one of our cron jobs is writing errors to a log file. Any ideas on the following error message. Error: Internal system error: Unable to initialize standard output file I'm guessing more info might be needed, so let me know. Thanks (2 Replies)
Discussion started by: firkus
2 Replies

10. UNIX for Dummies Questions & Answers

Is there an unrecoverable erase command?

I am "retiring" an old unix box and need to erase all sensitive data so that it can not be recovered. Does anyone know a unix command for this? (5 Replies)
Discussion started by: snyderpa
5 Replies
Login or Register to Ask a Question