[cups.general] How do I set the default media size when creating a new printer in Linux?

Martin Schuster (IFKL IT OS DS CD) Martin.Schuster1 at infineon.com
Thu Jul 29 00:15:14 PDT 2010


On 07/29/2010 04:12 AM, Dimitri wrote:
> 
> I am using both RHEL4 (1.1.22) and RHEL5 (1.3.7). When I add a new
> printer the default is always A4. I never print A4 and always print US
> Letter. I have no problems changing the default on a per-printer
> basis, but sometimes I forget to do that and do not discover it until
> I've spent time trying to figure out why my workstation will not
> print. Is there a way to tell CUPS what I'd like my default to be when
> creating new printers? That is, "CUPS, when creating a new printer let
> configure it to use US Letter unless I specify otherwise?" I could not
> find a place to set this once and for all. Configuring it per-printer
> is a drag.
> 
You can configure this in the PPD-file you provide when adding the
printer.

Look for lines that say
*Default[something]: A4
and replace them with
*Default[something]: Letter

This command should do this for you:
sed -i 's/^\*Default\(.*\): A4/*Default\1: Letter/' foobar.ppd

hth,
-- 
Infineon Technologies IT-Services GmbH   Martin.Schuster1 at infineon.com
Lakeside B05, 9020 Klagenfurt, Austria   Martin Schuster
         FB: LG Klagenfurt, FN 246787y   +43 5 1777 3517





More information about the cups mailing list