Cannot change default paper size in CUPS

13,259

Solution 1

I found a workaround to this.

I edited the ppd file of the printer (/etc/cups/ppd/...) and changed the line

*OrderDependency: 60.0 AnySetup *PageSize

to

*OrderDependency: 60.0 *PageSize AnySetup

(The default page size is set to A4.) It will cause problems if I wanted to print on any other paper than A4 - which I won't so this is kinda sufficient solution for me.

Solution 2

Check the contents of the file /etc/papersize editing to add a single line containing the page size as "a4" without the quotes which should then get A4 as the default printer page size for all applications including Libreoffice. Also there are the commands "paperconf", "papersize" and "paperconfig" so have a look at their man pages.

For the printer itself try using a browser to go to localhost:631 which should get you to the cups management interface and then click the printers tab, and then manage the printer concerned. From here it should be possible to change the default printer page size to A4.

Share:
13,259

Related videos on Youtube

Fiisch
Author by

Fiisch

System Engineer

Updated on September 18, 2022

Comments

  • Fiisch
    Fiisch over 1 year

    I'm running suse 12.1x86 (Gnome 3) with cups 1.5.x (guessing, I'm not at my pc right now). We have a network-connected Xerox printer and recently we changed its IP.

    Connection to the printer was configured through socket like: socket://1.1.1.1:9100/. I was changing IP in my configuration "the lazy way" - editing the configs. I did following:

    1. stopped cups
    2. edited printers.conf and printers.conf.0 and changed socket://1.1.1.1:9100 to socket://2.2.2.2:9100
    3. started cups
    4. checked if change went ok (it did)

    With the old configuration everything was working superb. After I changed the IP, my cups keeps telling me I have selected "US Letter" paper format (I was using and want to use A4). Also apps like LibreOffice and gedit default to "US Letter" and even if I change the settings in them directly it doesn't work - they immediatelly back from "A4" to the "US Letter". But when I look into cups web interface on localhost:631 everything is set to the "A4" and correct.

    I also tried reinstalling cups by deleting:

    /etc/cups/*

    /var/spool/cups

    /var/log/cups

    and reinstalling through zypper in --force cups with no effect. Do you have any ideas where I should look now? (Needles to say i tried to delete and create printer, reconfigure it through web interface and those obvious things.)

  • Arthur
    Arthur over 9 years
    This is also the file that lets you set up everything else such as duplex printing.
  • Elliptical view
    Elliptical view about 7 years
    Thanks! 'paperconfig -p letter' did the trick for me. Also localhost:631 blew my doors off! Great!