Does Cups support DeviceAdjustMatrix?

Michael Sweet mike at easysw.com
Fri Dec 8 05:56:33 PST 2006


Helge Blischke wrote:
> Jonathan Ryshpan wrote:
>>>> Helge Blischke wrote:
>>>>
>>>>> The JobPatchFile PPD keyword is honoured by CUPS, so you could 
>>>>> modify your
>>>>> PPD for that.
>>
>>
>>> Jonathan Ryshpan wrote:
>>>
>>>> I would think that the following PPD file:
>>>> ...
>>>> *JobPatchFile 1: "
>>>> 0.5 0.5 scale"
>>>> ..
>>>> would make everything print half size.  But it doesn't.
>>>
>> Michael Sweet wrote:
>>
>>> scale and other operators that affect the graphics state do *not*
>>> survive setpagedevice and other operators that normally occur in a
>>> PS document.
>>
>>
>> Jonathan Ryshpan writes:
>> It looks like there's no way to get there from here -- i.e. there's no 
>> way to use Cups to reduce the size of the image from all jobs so that 
>> it fits onto the printable area of my printer (a Brother HL-1440); and 
>> that I'll have to modify all of the applications
>>
>> Unless -- maybe -- I can modify gs_init.ps in the ghostscript library 
>> as is recommended by align.ps, which might affect everything going 
>> through the ghostscript interpreter, i.e. most of what I print.  
>> However, there's a problem here that I'd like some help with: the 
>> print layint is affected by *both* the ppd file *and* gs_init.ps .  Is 
>> there a procedure or HowTo about how to separate the effects of these 
>> two files?
>>
>> BTW: Thank both Mr. Blischke and in particular Mr. Sweet for all your 
>> help with this.
>>
>> jon
> 
> I think you'd need to set up a /BeginPage procedure in the JobPatchFile
> which applies the DeviceAdjustMatrix (as at that time the coordinate
> system has been initialized to the device default). It may be reasonable
> or even necessary to defer the actual execution of the setpagedevice
> operator; it depends on what the setup defined by the PPD does
> otherwise. Perhaps you can put this stuff into a modified /Install
> procedure for the page device (but that usually requires knowledge
> of the current contents of this procedure).

But again, if the driver or the device is not capable of supporting
your margins or scaling, then this won't work.  Ultimately you need
to tell your applications to use the correct margins; if they use
the standard printing APIs (either the CUPS API or the corresponding
toolkit APIs) then there is no excuse for not using the device
margins from the PPD file.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list