[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: samba print problem



On Fri, Nov 30, 2001 at 09:59:08PM +0000, Pollywog wrote:
| I have a desktop running Linux and a laptop running Win95 that sends print 
| jobs to the printer (printer is connected to desktop) via Samba.
| The laptop prints okay but whenever I print from the laptop, an extra page 
| is printed at the end of the print job and that page contains only 
| something that looks similar to this:
| 
|      %% Number of pages  %%
|      %%       2           %%
| 
| 
| or something similar to that.   Is there a way to get rid of that?  The 
| printer is sending the printjobs to the desktop in Postscript format.

Yeah, sucks doesn't it?

I'm using CUPS as my spooler.  In the PPD file I have the following
line :

*cupsFilter: "application/vnd.cups-postscript 0 ps_to_bjc"

I have a shell script in /usr/lib/cups/filter called ps_to_bjc.  This
script is executable.  I looks like :

#!/bin/sh

if [ "$7" != "" ] ; then
    sed -e "s/^.*%%\[ .*Page.* \]%%.*$//" | gs -sDEVICE=bjc600 -sOutputFile=- -q - < "$7" 
else
    sed -e "s/^.*%%\[.*Page.*\]%%.*$//" | gs -sDEVICE=bjc600 -sOutputFile=- -q -fi


The sed stuff strips out that junk windoze spews out, then sends it
through gs to convert it to the datastream this inkjet needs.  The
stdout of the script is sent straight to the printer device (the
'parallel' cups driver in my case).

-D

-- 

If we confess our sins, He is faithful and just and will forgive us our
sins and purify us from all unrighteousness.
        I John 1:9



Reply to: