[cups.general] Difference CUPS <-> Windows Spooler

Michael Sweet mike at easysw.com
Fri Feb 22 12:33:30 PST 2008


Stefan Monnier wrote:
> ...
>> While some file formats can be read from a stream, most cannot.  In
> 
> I don't know enough about cups internals,  but from what I can tell it
> mostly take pdf/ps as input and spits out raw-printer-data, all 3 could
> be streamed just fine last time I checked.

Except for 1 ISO subset (PDF/is), PDF cannot be streamed.  Both PDF
and PostScript cannot be streamed if you are reversing the output or
doing certain types of page imposition.

Also, CUPS accepts a lot more than PDF and PostScript.

> ...
> Huh?  If you told me that it would require too many changes to existing
> code, I would take your word for it.  But claiming it can't be
> worthwhile, on purely theoretical grounds, is hard to agree with.

Then maybe you can accept my 25 years of professional programming
work, 15 years of work on printing in the UNIX and Windows
environments, and 10 years of working on CUPS in particular.

Writing print data to multiple files (spool file + temp file for
filter) is slower than writing to one file and then reading from
it.  It is also more complicated since we normally have to examine
the incoming print data to determine the file type.

The only advantage you get is lower latency for a subset of the
files you print.  For normal printing there is no benefit since
PDF print data produced by common open source applications and
CoreGraphics on Mac OS X is not streamable.

So, yes, it *is* possible to do and under certain cases you'll
actually see a performance benefit.  However, in the end the
benefits are small enough and the overhead is large enough that
it just is not worth doing.

> I for one would be happy to use twice as much disk space or even network
> bandwidth so that my documents start printing more quickly.

Feel free to write your own printing system.

> And if you structure your code accordingly *from the start*, then it's
> not difficult to use a system where you can stream everywhere, and those
> filters that need to peek at the beginning of the file to recognize its
> content can peek just fine, and those that need random access or that
> need to store the thing on disk for some other reason can do it as well.
> It's not that hard.  And it does not require more disk space or network
> bandwidth than what we use now.

If you don't care about reliability, extensibility, or compatibility
with existing UNIX/Linux printer drivers, then of course you can
write a printing spooler like Windows that starts printing right
away.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com




More information about the cups mailing list