[HIGH] STR #4142: Printing to Postscript printer barely works

Jim Paris <jim-XrPbb/[email protected]>
Newsgroups gmane.comp.printing.cups.bugs
Message-ID <[email protected]>
DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Hi,

I bought a new Brother HL-5370DW.  It is a networked Postscript printer. 
I had extra RAM lying around when I bought it, so I maxed it out at 544 MB
RAM.  I've generally had no problem printing to it by doing "print to .PS"
from my programs, followed by:
  cat file.ps | nc hl5370dw.local 9100

It sort of works, but the first page is very low quality, if I instead
"print to .PDF" and use pdftops from poppler-utils:
  pdftops file.pdf - | nc hl5370dw.local 9100

CUPS 1.5 has been giving me problems though.  Earlier versions would just
spit out blank pages, crash the printer, spit out raw garbage, or hang
indefinitely while chewing up CPU on my print server machine.  The latest
in Debian (1.5.3) sometimes works, but is extremely slow (20 seconds to
send a test page to the printer, which the printer takes an additional 300
seconds to actually print), and the quality is has some issues (looks like
some slight bitmap scaling on the text).

I've downgraded my machine to the version in Debian stable (1.4.4) and it
works perfectly (fast & high quality) when I send a PS file to cups.  When
I send a PDF, it is still fast but has the same first-page-quality issue
mentioned earlier.

Quality aside, you don't need to actually print to see the performance
problems, so hopefully this is easily reproducible for you.  I wrote a
simple Python script to listen on port 9100 (attached), and dump to a file
any data that gets sent on a connection.  With cups 1.4.4 configured for
the HL5370DW and pointing to socket://pc:9100, the files show up nearly
instantly and are small (e.g. the test page is 49kB).  With cups 1.5.3,
the files take 15 seconds to appear, during which the print server has a
"gs" process consuming hundreds of megs of RAM and chewing up 100% CPU. 
When the files finally appear, they're 7,664kB.

In summary, my current choice is between 1.4.4 (fast, but low quality
first pages when printing PDF) or 1.5.3 (slow to the point of being
unusable).  I'm not sure how to exactly sort this out, and seem to be just
wasting paper in my attempts.  Any suggestions?

Link: http://www.cups.org/str.php?L4142
Version: 1.5.3

_______________________________________________
cups-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/cups-bugs
fakeprinter.py (application/octet-stream, 473 B)
#!/usr/bin/python

import SocketServer
import time

class FakePrinter(SocketServer.StreamRequestHandler):
    def handle(self):
        print "Connection from %s" % self.client_address[0]
        data = self.rfile.read()
        name = "%s-%.6f.ps" % (self.client_address[0], time.time())
        with open(name, 'w') as f:
            f.write(data)
        print "Wrote %d bytes to %s" % (len(data), name)

SocketServer.TCPServer(('', 9100), FakePrinter).serve_forever()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.