Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Another Ghostscript question

0 views
Skip to first unread message

David H. Funte

unread,
Mar 7, 2001, 3:06:11 PM3/7/01
to
I think I solved my installation problem. I didn't have the graphics part
of OSR loaded.

Now that it IS "working" - how does it work?

this is how I thought it would work.

jpeg2ps file.jpg >file.ps

gs -sDEVICE=ljet4 -sOutputfile=file.out file.ps

this doesn't crash, but it doesn't do anything either. It just returns me
to a #

I expect that this command will put a PCL version of file.ps into a file
called "file.out"
But no file.out is created. Variations on this command produce nothing.

Is this syntax correct?

Thanks
--


Jean-Pierre Radley

unread,
Mar 7, 2001, 4:15:23 PM3/7/01
to ScoMisc [c.u.s.m]
David H. Funte <none> propounded (on Wed, Mar 07, 2001 at 02:06:11PM -0600):

| I think I solved my installation problem. I didn't have the graphics part
| of OSR loaded.
|
| Now that it IS "working" - how does it work?
|
| this is how I thought it would work.
|
| jpeg2ps file.jpg >file.ps

Where does that command come from?

| gs -sDEVICE=ljet4 -sOutputfile=file.out file.ps
|
| this doesn't crash, but it doesn't do anything either. It just returns me
| to a #

I use this script to print postscript files to my HP OfficeJet. It reads
either filename arguments, or stdin.

#!/bin/sh
case $# in
0) gs -q -sDEVICE=djet500 -dNOPAUSE -sOutputFile=- - -c quit | lp -og -s;;
*) gs -q -sDEVICE=djet500 -dNOPAUSE -sOutputFile=- $@ -c quit | lp -og -s;;
esac

--
JP

David H. Funte

unread,
Mar 7, 2001, 5:00:00 PM3/7/01
to

Jean-Pierre Radley <j...@jpr.com> wrote in message
news:2001030716...@jpradley.jpr.com...

> David H. Funte <none> propounded (on Wed, Mar 07, 2001 at
02:06:11PM -0600):
> | I think I solved my installation problem. I didn't have the graphics
part
> | of OSR loaded.
> |
> | Now that it IS "working" - how does it work?
> |
> | this is how I thought it would work.
> |
> | jpeg2ps file.jpg >file.ps
>
> Where does that command come from?

I got that from the net. http://www.ifconnection.de/~tm
I needed a way to convert jpeg to postscript, so that gs would send it to
the laser.

>
> | gs -sDEVICE=ljet4 -sOutputfile=file.out file.ps
> |
> | this doesn't crash, but it doesn't do anything either. It just returns
me
> | to a #
>
> I use this script to print postscript files to my HP OfficeJet. It reads
> either filename arguments, or stdin.
>
> #!/bin/sh
> case $# in
> 0) gs -q -sDEVICE=djet500 -dNOPAUSE -sOutputFile=- - -c quit |
lp -og -s;;
> *) gs -q -sDEVICE=djet500 -dNOPAUSE -sOutputFile=- $@ -c quit |
lp -og -s;;
> esac
>

I found the problem.

gs -sOutputfile=file.name -sDEVICE=ljet4 -q -sPAPERSIZE=letter -dNOPAUSE --
mom1.ps -c quit

The -sOutputFile flag isn't working.
I happened to notice some files in the /tmp directory.

-rw-rw-rw- 1 root sys 114037 May 5 14:28 gs_a002h9
-rw-rw-rw- 1 root sys 567932 May 5 14:33 gs_a002hv
-rw-rw-rw- 1 root sys 567932 May 5 14:52 gs_a002io
-rw-rw-rw- 1 root sys 567932 May 5 14:53 gs_a002it
-rw-rw-rw- 1 root sys 567932 May 5 14:54 gs_a002iw

I sent these files to the printer, and viola! IT'S SOUP!
My problem now is that I need the -sOutputFile to work.
This version of gs came from the Skunkware 2000 CD. I removed all my
previous attempts, and loaded the full Skunkware disk via /mnt/INSTALL.

Two steps forward, twelve miles back

Am I the only one that has a hard time getting ghostscript to run?

----------------------------

I also tried loaded v6.0 and got the following message with the same command
line

Error: /undefinedfilename in --.outputpage--
Operand stack:
--nostringval-- 1 true
Execution stack:
%interp_exit
.runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval--
fa
lse 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop
.runexec
2 --nostringval-- --nostringval-- --nostringval-- 2
%stopped_push --
nostringval-- --nostringval-- 1 3
%oparray_pop --nostringval-- --nos
tringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:950/983(ro)(G)-- --dict:0/20(G)-- --dict:68/200(L)--
Current allocation mode is local
Current file position is 90610
Aladdin Ghostscript 6.0: Unrecoverable error, exit code 1


> --
> JP


Jean-Pierre Radley

unread,
Mar 7, 2001, 5:57:38 PM3/7/01
to ScoMisc [c.u.s.m]
David H. Funte <none> propounded (on Wed, Mar 07, 2001 at 04:00:00PM -0600):

|
| >
| > #!/bin/sh
| > case $# in
| > 0) gs -q -sDEVICE=djet500 -dNOPAUSE -sOutputFile=- - -c quit | lp -og -s;;
| > *) gs -q -sDEVICE=djet500 -dNOPAUSE -sOutputFile=- $@ -c quit | lp -og -s;;
| > esac
| >
|
| I found the problem.
|
| gs -sOutputfile=file.name -sDEVICE=ljet4 -q -sPAPERSIZE=letter -dNOPAUSE --
| mom1.ps -c quit

Uh, did you try my script, using 'jpeg2ps <input.jpeg | jp-script'?


--
JP

David H. Funte

unread,
Mar 8, 2001, 10:11:40 AM3/8/01
to
Problem solved...I can't believe the answer..

gs -q -sDEVICE=ljet4 -sPAPERSIZE=letter -dNOPAUSE -sOutputfile=xxx
mom1.ps -c quit

gs -q -sDEVICE=ljet4 -sPAPERSIZE=letter -dNOPAUSE -sOutputFile=xxx
mom1.ps -c quit

One of these lines works, and the other doesn't. Notice the "F" in the
"OutputFile" flag. It must be upper case - or else it does not work. The
program does accept it as a valid flag, but it ignores it later on in the
code. Technically, I messed up by not entering the flag precisely, but the
program should have warned me.

The program DOES validate command flags. gs -lskdjg produces an error
that -lskdjg is an invalid flag. But this one flag is half screwed up.
This is why I stopped putting upper case letters in my command line flags
years ago. It always spelled trouble.

I've ignored that Skunkware CD for years - mainly because the name smelled
like trouble. (get it? I crack me up)

Thank for your help....Now I get to finish my project.

Jean-Pierre Radley <j...@jpr.com> wrote in message

news:2001030717...@jpradley.jpr.com...

0 new messages