[<<][pool][>>][..]
Mon Feb 28 15:30:25 EST 2011

Crap CUPS

# Went back to stable, then did
apt-get uninstall <cups> <brother drivers> ...
apt-get autoremove
aptitude purge '~c'

Got it back to work now, but still get the 'No pages found!' error.

Again, installing a2ps doesn't help.

moms:/var/log/cups# apt-get install a2ps
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  lpr psutils wdiff
Suggested packages:
  emacsen-common groff gv html2ps graphicsmagick-imagemagick-compat imagemagick texlive-base-bin t1-cyrillic magicfilter apsfilter gs
The following NEW packages will be installed:
  a2ps lpr psutils wdiff
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,291 kB of archives.
After this operation, 6,078 kB of additional disk space will be used.
Do you want to continue [Y/n]?


So I re-purged.
Maybe the error message "a2ps" and "No pages found!" messages are not related?


Using cups-lpd from inetd works, but then the margins are not ok!
What a pile of crap!!

printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd



Anyways..  Let's dig a bit further.  It looks like
 /usr/local/Brother/Printer/mfc240c/lpd/filtermfc240c
receives an empty file on stdin.
I checked with wireshark, and the PS file is transferred over the ipp socket.

In the printers.conf the following filter is defined:
Filter application/vnd.cups-postscript 0 brlpdwrappermfc240c

How does the chain of command work?  The first executed filter is:

/usr/lib/cups/filter/brlpdwrappermfc240c

Which is the one that calls filtermfc240c.  Enabling the debug vars in
that file gives also an empty ps file.

Now, this file looks totally messed up!  What's with this:


nup="cat"
if [ "" != '' ] && [ $NUPENABLE != 0 ]; then

        if   [ "" != '' ]; then
                nup="psnup -64"
        elif [ "" != '' ]; then
                nup="psnup -32"
        elif [ "" != '' ]; then
                nup="psnup -25"
        elif [ "" != '' ]; then
                nup="psnup -16"
        elif [ "" != '' ]; then
                nup="psnup -8"
        elif [ "" != '' ]; then
                nup="psnup -6"
        elif [ "" != '' ]; then
                nup="psnup -4"
        elif [ "" != '' ]; then
                nup="psnup -2"
        elif [ "" != '' ]; then
                nup="cat"
        fi
        echo   "NUP=$nup"                                      >>$LOGFILE
   if [ -e /usr/bin/psnup ]; then
       if [ $# -ge 7 ]; then
               cat $6  | $nup > $INPUT_TEMP_PS
       else
               cat       | $nup > $INPUT_TEMP_PS
       fi
   else
       if [ $# -ge 7 ]; then
               cp $6  $INPUT_TEMP_PS
       else
               cat    > $INPUT_TEMP_PS
       fi
   fi
else
   if [ $# -ge 7 ]; then
      cp $6  $INPUT_TEMP_PS
   else
      cat    > $INPUT_TEMP_PS
   fi
fi


My guess is it's the line "if [ $# -ge 7 ]; then", that should be 6.

The other guess is then that for normal printing the input comes on
the stdin instead of being supplied by a file like for remote?

Let's try.

Yes, print comes through, but the margins are likewise messed up.

But!  The margins are off by the difference of A5 and letter format,
so that's probably just openoffice config.

Where can I send this fix?



[Reply][About]
[<<][pool][>>][..]