Bug 191601

Summary: cups requests letter size paper although media size a4 is chosen
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: ghostscriptAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.15.3-1.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-12-12 16:23:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 207681    
Attachments:
Description Flags
CUPS generated PPD file for HP LaserJet 4100 w/paper size A4
none
CUPS 1.2.1 PPD file for HP LaserJet 4100 w/paper size A4
none
"CUPS" 1.2.1 error log file for "laserjet.ppd" none

Description Joachim Frieben 2006-05-13 19:03:09 UTC
Description of problem:
During the installation of a printer by means of the "CUPS" web interface,
media size "A4" was chosen. However, when a file is printed, the printer
warning light starts blinking and the printer urges the user to load
plain "Letter" size paper. Both, the "CUPS" web interface and the "GNOME"
print dialog ("gedit") show media/paper size "A4".

Version-Release number of selected component (if applicable):
cups-1.2.0-2

How reproducible:
Always

Steps to Reproduce:
1. Install a printer with media size "A4".
2. Print a document from "gedit" etc.
  
Actual results:
Printer asks "Tray 1 load plain letter"

Expected results:
Document should be printed without prompting the user.

Additional info:
The printer is installed as "HP LaserJet Series PCL 4/5 CUPS v1.2". The
physical media size is "A4". The "CUPS" administration page shows four
parameters including one for the media size ("A4"). Printing used to
work flawlessly for FC5 (cups 1.1.23). However, settings were exclusively
applied through "system-config-printer-gui" whose current version adapted
to version 1.2 is broken.

Comment 1 Joachim Frieben 2006-05-13 19:03:09 UTC
Created attachment 128981 [details]
CUPS generated PPD file for HP LaserJet 4100 w/paper size A4

Comment 2 Joachim Frieben 2006-05-13 19:09:01 UTC
The "CUPS" test page is printed immediately without user interaction,
and the margins look right, too.

Comment 3 Joachim Frieben 2006-05-13 19:10:29 UTC
The issue is not restricted to "GNOME" applications, e.g. "xpdf" is also
affected.

Comment 4 Tim Waugh 2006-05-15 10:39:48 UTC
From the original report:

> However, settings were exclusively
> applied through "system-config-printer-gui" whose current version adapted
> to version 1.2 is broken.

Can you please be a bit more specific about this?  Do you mean the 0.7.x
version?  If so, please file a bug against it!  It works fine for me.

The problem with the attached PPD seems to be that DefaultImageableArea and
DefaultPageDimension are both set to 'Letter'.  Investigating.

Comment 5 Joachim Frieben 2006-05-15 11:56:58 UTC
Yes, I have noticed that too. I tried to set both to "A4" but that
didn't make a difference to me.
The new "system-config-printer-gui" shows empty label buttons or
rather something like "label+number" as if the text resource had not
been set. After entering all printer parameters, the last
confirmation button did not respond to mouse clicks, and no ppd file
was written. I will check sometime soon ... reverted to FC4 for the
time being.

Comment 6 Joachim Frieben 2006-05-26 18:58:19 UTC
Argh! This seems to be one of the meanest bugs ever: the 1.2.x
packages have dropped the requirement on "foomatic". Consequently,
only the very basic and apparently flaky "CUPS" internal "PPD" files
using "PCL" are available.

As soon as the current "foomatic" package is installed, a huge choice
of different drivers is available again as in FC5 and earlier releases
of Fedora Core. After chosing "HP LaserJet 4100 Series v.3010.107
Postscript (recommended)", setting up the printer is straightforward
with an exhaustive set of configuration options fitting the particular
model, e.g. 1200 dpi instead of 600 dpi for the "CUPS" delivered "PCL"
driver. The letter size problem is also gone. I strongly suppose that
many if not most of the recent 1.2.x related bug reports are due to the
missing "foomatic" package.

Comment 7 Joachim Frieben 2006-06-14 14:19:10 UTC
Btw, the bug is still present, as soon as the generic "CUPS" driver:

    /usr/share/cups/model/laserjet.ppd.gz

is installed instead of the "foomatic" one.

Comment 8 Tim Waugh 2006-06-15 13:06:34 UTC
I couldn't reproduce this here.  Please supply some more information:

1. What's in /etc/sysconfig/i18n?

2. What does 'grep DefaultPageSize /etc/cups/ppd/{queuename}.ppd' say, as root?

3. When you go to print from gedit, what page size is listed in the 'Paper' tab?

Comment 9 Joachim Frieben 2006-06-16 19:44:45 UTC
1. Content of "/etc/sysconfig/i18n":

     LANG="en_US.UTF-8"
     SYSFONT="latarcyrheb-sun16"

2. Output of "grep DefaultPageSize /etc/cups/ppd/laserjet.ppd":

     "*DefaultPageSize: A4"

3. Page size listed in the "Paper" tab:

     "A4"

After acknowleding that printing is ok on "A4" paper, the red
warning light turns off, the page is printed, but the used
area actually corresponds to "Letter" size.

Comment 10 Joachim Frieben 2006-06-16 19:52:56 UTC
Created attachment 131079 [details]
CUPS 1.2.1 PPD file for HP LaserJet 4100 w/paper size A4

Comment 11 Tim Waugh 2006-06-20 14:04:10 UTC
Please edit /etc/foomatic/filter.conf and add the line:

debug: 1

Then try your print job again, and attach /tmp/foomatic-rip.ps and
/tmp/foomatic-rip.log to this bug report.  Thanks.

Comment 12 Joachim Frieben 2006-06-20 15:12:47 UTC
After applying your modification, "grep debug /etc/foomatic/filter.conf"
returns "debug: 1". So far, so good. I reboot the machine to be on the
safer side and print a text file from within "gedit", and the printer
warning light starts flashing as before.
No file "foomatic-rip.ps" or "foomatic-rip.log" gets created in the
"/tmp" directory. However, the current driver for which I have reported
this bug actually is

  "HP LaserJet Series PCL 4/5 CUPS v1.2" as delivered with "cups",

and the printer file reads "laserjet.ppd" It seems reasonable to me,
that as this is no "foomatic" driver, no "foomatic" log files are
produced, right?

Comment 13 Tim Waugh 2006-06-20 15:29:42 UTC
Oh, didn't see that (pity).  Okay, then please edit /etc/cups/cupsd.conf and
change the LogLevel line to read:

  LogLevel debug2

Then stop CUPS:

  /sbin/service cups stop

Empty the error_log file:

  >/var/log/cups/error_log

and restart CUPS:

  /sbin/service cups start

Try your print job, and attach the /var/log/cups/error_log file here.  Thanks.

Comment 14 Joachim Frieben 2006-06-20 17:29:17 UTC
I have attached the entries in the error log stemming from the
printing of a text file from within "gedit". I have also printed
the file directly via the "lp" command. Here, the printing works
normally which is compatible with comment #2 where I had reported
that I was able to print the "cups" test page.
However, the print job sent by "gedit" does get stuck - maybe a
problem with the "GNOME" printing libraries?

Comment 15 Joachim Frieben 2006-06-20 17:30:08 UTC
Created attachment 131209 [details]
"CUPS" 1.2.1 error log file for "laserjet.ppd"

Comment 16 Tim Waugh 2006-06-22 11:19:00 UTC
So the gedit print job gets stuck?  Or prints in landscape?  Or prints in
landscape and then gets stuck half-way through?

What happens if you print to 'Generic Postscript' (i.e. print to file) in gedit,
and then print the resulting file using the lp command?

Comment 17 Joachim Frieben 2006-06-22 16:58:40 UTC
I have installed two printing devices, one based upon the generic "CUPS"
driver "laserjet.ppd" for which the bug report had been submitted, the
other one using the recommended "foomatic" driver for the HP LaserJet 4100.
After printing from "gedit" to "output.ps", I send a copy to each of them
via "lp -dname output.ps.
In the first case, the job gets stuck asking for plain letter format
paper. In the second case, the file is printed correctly with standard
"gedit" decorations.

Comment 18 Tim Waugh 2006-06-23 10:20:08 UTC
I do see the same error_log now.  Reported upstream:

  http://cups.org/str.php?L1794

Comment 19 Tim Waugh 2006-07-14 11:24:13 UTC
Changing component to ghostscript, as upstream.

Comment 20 Tim Waugh 2006-12-06 10:38:43 UTC
Please try the 8.15.3 test update from updates-testing.

Comment 21 Fedora Update System 2006-12-12 16:13:59 UTC
Fixed in update: ghostscript-8.15.3-1.fc6