[cups.general] Fixing the page-label option

Michael Sweet msweet at apple.com
Tue Sep 28 09:40:34 PDT 2010


On Sep 28, 2010, at 9:12 AM, Tim Waugh wrote:
> Hi,
> 
> It's well-known¹ that the page-label option does not work correctly in a
> variety of situations, and that its behaviour not well-defined².
> 
> Specifically, no version of CUPS correctly (or, at least, consistently)
> place page labels on all combinations of PostScript-vs-PDF input and
> portrait-vs-landscape orientation.  Most commonly incorrect is the
> placement of page labels for landscape PDF input³.
> 
> Can there be a solution to this?  If not, what is preventing one from
> existing?  Is it the switch to PDF workflow, or a problem with the
> design of CUPS, or IPP, or PostScript?

The problem is that applications producing PostScript generally do a poor job, and the available PDF filters are not written for CUPS but instead are wrappers around general-purpose programs that have no interest in supporting the CUPS semantics.  Specifically, I can't tell pdftops or Ghostscript to always produce portrait documents (rotating as needed), nor can I get bounding boxes for each page or the cupsRotation comment added.

Things were a little different when we embedded our own fork of Xpdf (and then we *did* have a real CUPS PDF filter), but we got sufficient push back on that approach that we switched to the current wrapper filter with all of its limitations.

> What is the future of this job attribute?

"Future unclear".  It and the classification support were written years ago for a simpler set of supported formats and use cases.  Supporting page labels that follow the orientation and sizes of pages in a document for arbitrary file formats is going to be difficult.  And to be honest, the vast majority of users simply do not use page-label or Classification for their printing.

> Why is the PageOrientation comment not sufficient to determine the
> orientation of a given document page?

Because that comment is provided for viewing applications to know the desired viewing orientation, not the orientation of the page itself which may be pre-rotated or have a landscape size specification, which need to be addressed differently when applying the page label.

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair








More information about the cups mailing list