Hi,
when searching for a page size A4/Letter problem I have found entries like
Option media=na_letter_8.5x11in
Option output-bin face-down
Option page-bottom 43
Option page-left 19
Option page-right 20
Option page-top 13
Option print-color-mode color
Option print-quality 4
Option printer-resolution 300x300dpi
Option sides two-sided-long-edge
in the printer sections of the /etc/cups/printers.conf file. The "Option
media=na_letter_8.5x11in" makes the PageSize default being "Letter" when
in the PPD the default is set to A4.
See the mails cited below.
Mike Sweet tells that these are caused by programs setting IPP
attributes like "media-default". Does system-config-printer or some of
its auxiliary programs set such attributes?
Till
---------
From: Till Kamppeter
To: cups(a)easysw.com
Yesterday I have done some tests with a native PDF printer, using CUPS
1.5.2 and cups-filters 1.0.9 (if filters are in both CUPS and
cups-filters I have used the cups-filters versions) on Ubuntu Precise
(12.04). The PPD file contains only PJL options, including PageSize
being PJL as in contrary to PostScript option code cannot be embedded in
a PDF file.
I have set the default page size to A4 (all
"*Default{PageSize|PageRegion|ImageableArea|PaperDimension}:") via
lpadmin -p <printer> -o PageSize=A4
and send a JPG job via
lp -d <printer> -o PageSize=A4 -o scaling=100 file.jpg
Starngely enough, I got
CLJ3530pdf till 267 [26/Mar/2012:23:22:33 +0200] 1 1 - localhost
d08684-001 na_letter_8.5x11in -
in /var/log/cups/page_log and with
lpoptions -p <printer> -l
I got
PageSize/Page Size: *Letter A4 A5 A6 ISOB5 EnvC5 Env10 EnvDL 5x13 EnvC6
Executive B5 B6 Legal EnvMonarch 69x95mm Statement
but the job gets centered correctly on A4 paper.
A job without specifying A4 paper, like
lp -d <printer> -o scaling=100 file.jpg
does not get correctly centered.
So I have searched for ~/.cups/lpoptions and /etc/cups/lpoptions and did
not find anything. After that I have searched for a bug in CUPS, until I
found the line
Option media=na_letter_8.5x11in
and some other "Option=..." lines in the section for my printer in
/etc/cups/printers.conf. This printer and one other printer had these
lines (the second was the same printer but with the manufacturer's
PostScript PPD). After stopping CUPS, removing these lines and starting
CUPS again, the problem went away.
Where do these lines come from? Which program has inserted them? How can
I prevent such lines getting inserted?
Should CUPS get fixed by
lpadmin -p <printer> -o PageSize=A4
removing lines like this (Generally if setting the default for a certain
option, removing the "Option ..." line for this option as the default
gets set in the PPD)?
"Option ..." lines should only be there for non-PPD options, like
"number-up".
Till
---------
From: Mike Sweet
To: cups(a)easysw.com
Till,
On Mar 27, 2012, at 7:24 AM, Till Kamppeter <till.kamppeter(a)gmail.com>
wrote:
...
So I have searched for ~/.cups/lpoptions and /etc/cups/lpoptions and did
not find anything. After that I have searched for a bug in CUPS, until I
found the line
Option media=na_letter_8.5x11in
...
Where do these lines come from? Which program has inserted them? How can
I prevent such lines getting inserted?
At some point you (or some program) must have set the media-default
attribute for this printer, either through lpadmin or a corresponding
Set-Printer-Attributes/CUPS-Add-Modify-Printer request. The attribute
then sticks until reset or deleted (lpadmin -p printer -R media-default).
__________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair