[cups.general] CUPS filtering
Pascal DeMilly
list.cups at newgenesys.com
Fri Dec 10 11:30:11 PST 2004
Helge,
Thanks for answering back. What I don't understand is why the last
printer in the chain doesn't look at what it is receiving, see that it
is a postscript file and do a pstorasterize before sending it to the
laserjet filter? I thought this was the way cups worked. Everything up
to the last filter is geared toward postscript.
There is a file in my /etc/cups directory a mime.convs. In that file
there is a mimetype called:
application/vnd.cups-postscript application/vnd.cups-raster 100 pstoraster
Should I enable this? And what is the difference between that file and
pstoraster.convs and mime.convs?
Thanks for all your help
Pascal
On Fri, 2004-12-10 at 06:52, Helge Blischke wrote:
> Pascal DeMilly wrote:
> >
> > Hi,
> >
> > I have a legacy system that prints report in ascii only. I setup a cups
> > server with a raw printer that basically mpage that ascii file into a PS
> > (using -i script of lpadmin) and send the result to another CUPS printer
> > which is a laserjet.
> >
> > The problem that I am having is that the last printer in the chain does
> > recognize that this file is a PS script file and that it should
> > rasterize it before sending it to the PCL printer. It seems it sends it
> > in raw format. How can I force that printer to do just that.
> >
> > He is my script on the ascii to ps queue. The print queue was created as
> > follow: lpadmin -p fs1-offc-1-aps -v ipp://fs1-offc-1-lnx/printers/local
> > -m raw -i mpageit -E
> >
> > #!/bin/sh
> >
> > TMPFILE=/var/tmp/mpage.$$
> >
> > if [ -f $6 ]; then
> > cp $6 $TMPFILE
> > else
> > cat >$TMPFILE
> > fi
> >
> > [ "`wc -L $TMPFILE | awk '{print $1}'`" -gt 80 ] && opt="-l"
> > mpage -m40lr -1 $opt -L66 $TMPFILE
> > rm -f $TMPFILE
> >
> > Here is a sample of the log of the last printer (Lexmark e232 setup as a
> > laserjet) on fs1-offc-1-lnx. lpadmin -p local -v usb:/dev/usb/lp0 -m
> > laserjet.ppd.gz -E
> >
> > [log stripped off]
>
> > Any help appreciated
> >
> > Regards
> >
> > Pascal
>
> Well, mpage spits out PostScript, and you use a printer that talks
> something else.
> Thus, raw printing is not appropriate.
> Create a neew mime type, say text/foo, install your script as a CUPS
> filter,
> say foo_bar, and define a new conversion rule in mime.convs as
>
> text/foo application/postScript 33 foo_bar
>
> Be careful when defining the mime type. The name msut be lexically lower
> than
> text/plain so that the default text/plain does not get involved.
>
> Helge
--
Pascal DeMilly <list.cups at newgenesys.com>
More information about the cups
mailing list