Force papersize to A4

Helge Blischke h.blischke at srz.de
Fri Apr 22 09:02:12 PDT 2005


Kevin Ivory wrote:
> 
> On 2005-04-15 14:37, Helge Blischke wrote:
> > Daniel Lawson wrote:
> >>What I'm asking is: is there any existing method to force papersize from Letter to A4?. I'm willing to accept that there might be some formatting issues or even lost data, but when people start complaining about that I can fix their profiles in turn.
> ..
> > Yes, there is a solution, suing the JobPatchFile keyword in the PPD. You
> > could modify
> > this printer's PPD by inserting the following snippet near the global
> > properties
> > (e.g. after the TTRasterizer stuff):
> > ---snip---
> > *JobPatchFile 1: "
> > % force A4 media size
> > /_sys_setppagedevice /setpagedevice load def
> > /setpagedevice
> > {
> >   dup /Pagesize known
> >   {dup /Pagesize [595 842] put}if
> >   _sys_setpagedevice
> > }bind def"
> > *End
> > ---snip---
> > And don't forget to configure the printer to default A4 in CUPS.
> 
> This code snippet looks exactly like something we need and I tried it
> right away with our HP 4100 (ppd from Hewlett-Packard for Win NT 4.0).
> 
> Before adding your snippet, I got a page with the message:
> ERROR: configurationerror
> OFFENDING COMMAND: setpagedevice
> ERRORINFO: [/PageSize [612 792]]
> 
> After adding your snippet, I get a page with the message:
> ERROR: undefined
> OFFENDING COMMAND: _sys_setpagedevice
> 
> Do you have any idea what is going wrong and what must me changed?
> 
> Thanks
> Kevin

Damned typos ...

replace the "_sys_setppagedevice" by "_sys_setpagedevice" (without the
quotes), 
please.

Helge

-- 
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de




More information about the cups mailing list