Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Error in using GS (ghostscript) command in Unix Post 302387648 by rak007 on Sunday 17th of January 2010 11:56:06 PM
Old 01-18-2010
Error in using GS (ghostscript) command in Unix

We are sometimes facing issues while using the gs command in Unix.
PFB the explanation of the issue

1.Assume we are using the following command to merge few .out files to make a single .pdf file

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile= ABCD.pdf A.out B.out C.out D.out

2.This command ends up in error as follows (which makes no sense to us)

Code:
  ERROR: /rangecheck in --cvrs--
  Operand stack:
     --dict:7/7(L)--   F1   9.0   --dict:6/6(L)--   --dict:6/6(L)--   OUMRXC+Albany WT J   --dict:10/12(ro)(G)--   --nostringval--   --dict:7/7(L)--   --dict:7/7(L)--   1445   --dict:7/7(L)--   --nostringval--   FontMatrix   --nostringval--   FontBBox   --nostringval--   FontName   -2147483647   16   (\000\000\000\000\000\000\000\000)
  Execution stack:
     %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1   3   %oparray_pop   1   3   %oparray_pop   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--
  Dictionary stack:
     --dict:1119/1686(ro)(G)--   --dict:0/20(G)--   --dict:107/200(L)--   --dict:107/200(L)--   --dict:104/127(ro)(G)--   --dict:241/347(ro)(G)--   --dict:20/24(L)--   --dict:4/6(L)--   --dict:25/32(L)--   --dict:33/50(ro)(G)--   --dict:24/40(L)--
  Current allocation mode is local
  ESP Ghostscript 815.02: Unrecoverable error, exit code 1

3.Now the file ABCD.pdf has been created with size of few Kbs. It was found that the file ABCD.pdf is a merged output of files A.out and B.out which meant that there is some issue with the file C.out

4.So now we run the command again with C.out removed from the list as follows and it works without any error and we also get the output ABCD.pdf as merged from A.out B.out and D.out

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile= ABCD.pdf A.out B.out D.out

5.On opening the C.out file looks just fine like others but we really don't understand what problem is there with this file causing the command to fail. Even the attributes of the file C.out is same as others.
6.Bottom line is that having the file C.out in the list anywhere causes this error.

Any pointers in this regard will be appreciated.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ambiguous and Command not found Error in UNIX

Hi,All I wrote below script(Example1.sh) and i ran but it giveing error. it's excuted yesterday. SYSTEM_TIME=`date '+%H:%M:%S'` CMP_LOG_TIME=`head -1 runcmp-HINET.log` CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log` CMP_ENDED2=`echo "HINET CMP ended"` CMP_FAILED2=`echo "HINET... (2 Replies)
Discussion started by: koti_rama
2 Replies

2. Shell Programming and Scripting

Ambiguous and Command not found Error in UNIX

Hi,All I wrote below script(Example1.sh) and i ran but i got error. it's excuted yesterday. SYSTEM_TIME=`date '+%H:%M:%S'` CMP_LOG_TIME=`head -1 runcmp-HINET.log` CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log` CMP_ENDED2=`echo "HINET CMP ended"` CMP_FAILED2=`echo "HINET CMP... (2 Replies)
Discussion started by: koti_rama
2 Replies

3. UNIX for Dummies Questions & Answers

Ghostscript

I am trying to use Ghostscript oin AIX to print pdf's and it seems I have downloaded it and all dependencys fine - install went fine, when I type any gs commnad except gs -h it just hangs..Here is what it says before the hang: GNU Ghostscript 5.50 (2000-2-13) Copyright (C) 1998 Aladdin... (6 Replies)
Discussion started by: capeme
6 Replies

4. UNIX for Advanced & Expert Users

http error on unix command..

Hi, I am trying to hit an application which is listening on a specific port 2030 and is behind the firewall and get this error. maddy>telnet adrpd011 2030 GET /TestApp and it should give me 200 response, because the application is listening on that port. Instead it gives me this... (5 Replies)
Discussion started by: everurs789
5 Replies

5. Solaris

Unix restarts error in sar command

Hi Folks, I am again here with a peculier problem. Please see the code root@celdws01: # sar -u -f /var/adm/sa/sa21 SunOS celdws01 5.9 Generic_118558-34 sun4u 12/21/2011 10:10:09 %usr %sys %wio %idle 10:10:09 unix restarts Can anyone help me in... (9 Replies)
Discussion started by: vivek.goel.piet
9 Replies

6. UNIX for Dummies Questions & Answers

Mailx command in unix shell script, its throwing below error

How to use Mailx command in unix shell script, its throwing below error #!/bin/ksh let x=3 If ; then mailx -s “ $x is greater than 2” example@gmail.com << EOF This is the message body EOF fi its throwing error as syntax error at EOF... (10 Replies)
Discussion started by: only4satish
10 Replies

7. UNIX for Dummies Questions & Answers

Ghostscript error while converting PDF to Postscript

Hi, I have been using Ghostscript to convert PDF to Postscript (PS) file. GS version : 8.15.2. GS command used is : gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOutputFile=output1.ps input1.pdf File format conversion to PS is success in majority of the cases but some PDF files are... (0 Replies)
Discussion started by: geeveejey
0 Replies

8. Shell Programming and Scripting

for loop with internal unix command in statement throwing error

Hi I've gotten a plugin script that won't run. I keeps throwing an error at the following line. for BARCODE_LINE in `cat ${TSP_FILEPATH_BARCODE_TXT} | grep "^barcode"` do #something done The error reads ... (3 Replies)
Discussion started by: jdilts
3 Replies

9. UNIX for Advanced & Expert Users

Error executing sqlcmd command through UNIX

Hi All, I am trying to execute a set of sql statements in sql server 2008 using the sqlcmd command in unix and passing the query in the "input" parameter. It is giving me an error "incorrect syntax near 2014". The below statement is giving an error : declare date_val datetime, ... (4 Replies)
Discussion started by: Rahul Raj
4 Replies
PS2PDF(1)							    Ghostscript 							 PS2PDF(1)

NAME
ps2pdf - Convert PostScript to PDF using ghostscript ps2pdf12 - Convert PostScript to PDF 1.2 (Acrobat 3-and-later compatible) using ghostscript ps2pdf13 - Convert PostScript to PDF 1.3 (Acrobat 4-and-later compatible) using ghostscript ps2pdf14 - Convert PostScript to PDF 1.4 (Acrobat 5-and-later compatible) using ghostscript SYNOPSIS
ps2pdf [options...] {input.[e]ps|-} [output.pdf|-] ps2pdf12 [options...] {input.[e]ps|-} [output.pdf|-] ps2pdf13 [options...] {input.[e]ps|-} [output.pdf|-] ps2pdf14 [options...] {input.[e]ps|-} [output.pdf|-] DESCRIPTION
The ps2pdf scripts are work-alikes for nearly all the functionality (but not the user interface) of Adobe's Acrobat(TM) Distiller(TM) prod- uct: they convert PostScript files to Portable Document Format (PDF) files. If the output filename is not specified, the output is placed in a file of the same name with a '.pdf' extension in the current working directory. Either the input filename or the output filename can be '-' to request reading from stdin or writing to stdout, respectively, when used as a filter. The three scripts differ as follows: - ps2pdf12 will always produce PDF 1.2 output (Acrobat 3-and-later compatible). - ps2pdf13 will always produce PDF 1.3 output (Acrobat 4-and-later compatible). - ps2pdf14 will always produce PDF 1.4 output (Acrobat 5-and-later compatible). - ps2pdf per se currently produces PDF 1.4 output. However, this may change in the future. If you care about the compatibility level of the output, use ps2pdf12, ps2pdf13 or ps2pdf14, or use the -dCompatibility=1.x switch in the command line. There are some limitations in ps2pdf's conversion. See the HTML documentation for more information. A large number of Adobe Distiller(TM) parameters which can be used to control the conversion are also documented there, including instructions for generating PDF/X and PDF/A documents. OPTIONS
The ps2pdf scripts use the same options as gs(1). EXAMPLES
Converting a figure.ps to figure.pdf: ps2pdf figure.ps A conversion with more specifics: ps2pdf -dPDFSETTINGS=/prepress figure.ps proof.pdf Converting as part of a pipe: make_report.pl -t ps | ps2pdf -dCompatibility=1.3 - - | lpr SEE ALSO
gs(1), ps2pdfwr(1), Ps2pdf.htm in the Ghostscript documentation BUGS
See http://bugs.ghostscript.com/ and the Usenet news group comp.lang.postscript. VERSION
This document was last revised for Ghostscript version 9.07. AUTHOR
Artifex Software, Inc. are the primary maintainers of Ghostscript. This manpage by George Ferguson. 9.07 12 February 2013 PS2PDF(1)
All times are GMT -4. The time now is 01:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy