Force papersize to A4

Kevin Ivory Ivory at
Fri Apr 22 08:25:09 PDT 2005

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?

   _             |  Kevin Ivory          |  Tel: +49-551-3700000
  |_     |\ |    |  Service Network GmbH |  Fax: +49-551-3700009
  ._|ER  | \|ET  |  Bahnhofsallee 1b     |  mailto:Ivory at
 Service Network |  37081 Goettingen     |

More information about the cups mailing list