[cups.development] document rotation; WAS Re: Access to IPP attributes in filters and backends

Jon Peatfield J.S.Peatfield at damtp.cam.ac.uk
Fri Dec 14 02:19:23 PST 2007


On Thu, 13 Dec 2007, Michael R Sweet wrote:

> urs-jakob.rueetschi at phz.ch wrote:
>> I would like to read and modify IPP job attributes from within filters 
>> and backends. What's the best way to do so? Do I have to use 
>> httpConnect(), ippWrite() and friends? Is there a simpler / more direct 
>> method?
>
> That is the only supported way to read attributes, however in general
> filters cannot modify attributes since the job is active.

Should a filter not be allowed to alter the options seen by later filters 
to say that they have been acted on already and don't need to still be 
done?

Otherwise when (say) a PDF job requests page rotation how does the pdftops 
tell pstops not to also attempt to rotate the job?

Currently running cups-1.3.4 on a test server I see PDF jobs submitted 
from MacOSX with orientation-requested set to 4 (landscape) ending up 
printed incorrectly rotated (upside down I think 'cos it looks like two 
sets of 90 degree rotations are being done).

Manually running pdftops and then pstops with orientation-requested=4 
shows that each of them seems to do a rotation on the job.  Is this 
expected?

Just letting pdftops do it's rotation (hacking pstops temporarily to hide 
the orientation-requested option), the documents come out with the correct 
orientation (hooray), but offset on the A4 page by about an inch.

Hacking pdftops to _not_ do it's rotation and letting pstops alone seems 
to do a better job - at least for a couple of simple test pages).

[ I note that the MacOSX 10.4 setup doesn't use the standard cups pdftops 
itself so has different behaviour. ]

I see code in PSOutputDev.cxx; PSOutputDev::writeHeader() to pass a majic 
comment to pstops and code in pdftops.cxx; main() to do the rotation 
(thought at that point it doesn't seem to have read the job pagesize).

When pstops.c; copy_comments() sees the cupsRotation comment it does 
something I don't really follow/understand.

Of course I could be completely misunderstanding the problem, or it might 
be a fault of the way we built cups here rather than in cups itself.

> STATE: and PAGE: messages can be used to modify the
> printer-state-message and job-media-sheets-completed attributes,
> respectively.

-- 
Jon Peatfield,  Computer Officer,  DAMTP,  University of Cambridge
Mail:  jp107 at damtp.cam.ac.uk     Web:  http://www.damtp.cam.ac.uk/





More information about the cups-devel mailing list