Bug 518756 - hpcups margin problem
Summary: hpcups margin problem
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hplip
Version: 11
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 515470 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-08-22 12:15 UTC by Edward Sheldrake
Modified: 2009-08-31 23:31 UTC (History)
2 users (show)

Fixed In Version: 3.9.8-12.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-31 23:31:08 UTC


Attachments (Terms of Use)
The .ppd file an unmodified hpcups generates for my printer (27.65 KB, text/plain)
2009-08-25 18:03 UTC, Edward Sheldrake
no flags Details
My "fixed (just for A4)" .ppd file (27.67 KB, text/plain)
2009-08-25 18:04 UTC, Edward Sheldrake
no flags Details
The change to hpcups.drv (961 bytes, patch)
2009-08-25 18:06 UTC, Edward Sheldrake
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Launchpad 405116 None None None Never
Launchpad 419165 None None None Never

Description Edward Sheldrake 2009-08-22 12:15:40 UTC
Description of problem:
Using the hpcups driver of hplip 3.9.8, my Deskjet 5940 doesn't print on the bottom approx. 13mm of the A4 page that "foomatic/hpijs" will print on.

For the hplip test page, the bottom ruler is missing, for the cups test page, the bottom bordering line and the bottom "Printer Test Page" text is missing.

Version-Release number of selected component (if applicable):
hplip-3.9.8-6.fc11
ghostscript-8.70-1.fc11
cups-1.4-0.rc1.15.fc11

How reproducible:
Always.

Steps to Reproduce:
1. Pick hpcups driver, I'm using "Use new PPD file as is", in system-config-printer.
2. Print test page.
3.
  
Actual results:
Test page is missing a bit at the bottom.

Expected results:
Printed test page fills the paper correctly.

Additional info:
Possibly related are redhat bugzilla #515470 and https://bugs.launchpad.net/hplip/+bug/405116 (different printers, hpcups margin problems).

Comment 1 Tim Waugh 2009-08-23 10:03:57 UTC
Thanks for finding that Ubuntu bug report.  Can you see if downgrading to ghostscript-8.64-12.fc11 fixes it? (I have a printer that exhibits this problem here so I'll get to it myself eventually if not...)

Comment 2 Edward Sheldrake 2009-08-23 14:00:24 UTC
The problem remained after downgrading to ghostscript-8.64-12.fc11 (from koji) and restarting cups.

Comment 3 Edward Sheldrake 2009-08-25 18:01:37 UTC
I seem to have made some sort of progress today:

I edited hpcups.drv so that the stuff in the generated ppd for PageSize, for my printer and just normal A4 paper, matched the stuff for PageRegion.

This gets cupsInteger0 set to 26.

This appeared fix it!

I have no idea what the proper fix should be (or even what component).

Comment 4 Edward Sheldrake 2009-08-25 18:03:05 UTC
Created attachment 358614 [details]
The .ppd file an unmodified hpcups generates for my printer

Comment 5 Edward Sheldrake 2009-08-25 18:04:27 UTC
Created attachment 358615 [details]
My "fixed (just for A4)" .ppd file

Comment 6 Edward Sheldrake 2009-08-25 18:06:07 UTC
Created attachment 358616 [details]
The change to hpcups.drv

Comment 7 Edward Sheldrake 2009-08-25 20:34:30 UTC
And now I've noticed that compared to the hpcups ppd shipped in the hplip tarball, and the generated .ppd, this line is missing from the generated one:

*RequiresPageRegion All: True

Undoing my previous fix and adding that to the ppd in /etc/cups/ppd/ should also solve this problem.

Comment 8 Tim Waugh 2009-08-26 10:58:35 UTC
Brilliant, that's the fix.  Thanks!

In detail: /cupsInteger0 is used by hpcups for holding the PCL Page Size ID.  In this case, 26 corresponds to A4.  The PageRegion codes all contain the cupsInteger0 setting, but the PageSize codes do not.

The CUPS pstops filter decides whether to emit PageSize or PageRegion codes based on a variety of factors:

/*
  * This function determines what page size code to use, if any, for the
  * current media size, InputSlot, and ManualFeed selections.
  *
  * We use the PageSize code if:
  *
  * 1. A custom media size is selected.
  * 2. ManualFeed and InputSlot are not selected (or do not exist).
  * 3. ManualFeed is selected but is False and InputSlot is not selected or
  *    the selection has no code - the latter check done to support "auto" or
  *    "printer default" InputSlot options.
  *
  * We use the PageRegion code if:
  *
  * 4. RequiresPageRegion does not exist and the PPD contains cupsFilter
  *    keywords, indicating this is a CUPS-based driver.
  * 5. RequiresPageRegion exists for the selected InputSlot (or "All" for any
  *    InputSlot or ManualFeed selection) and is True.
  *
  * If none of the 5 conditions are true, no page size code is used and we
  * unmark any existing PageSize or PageRegion choices.
  */

So when the PPD contains '*RequiresPageRegion All: True' it forces the PageRegion code (including the cupsInteger0 setting for the PCL Page Size ID) to be emitted.  This allows the hpcups driver to know to send the appropriate PCL command to the device.

This can be achieved for all PPDs by adding this to hpcups.drv:

Attribute "RequiresPageRegion" "All" "True"

Comment 9 Tim Waugh 2009-08-26 11:08:31 UTC
*** Bug 515470 has been marked as a duplicate of this bug. ***

Comment 10 Fedora Update System 2009-08-27 02:11:09 UTC
hplip-3.9.8-10.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update hplip'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6959

Comment 11 Edward Sheldrake 2009-08-27 19:50:14 UTC
The patch in hplip-3.9.8-10.fc11 fixes all the "HP" PPDs, but not the "Apollo" ones, there is another Manufacturer section hidden way down at the bottom of hpcups.drv.

Comment 12 Tim Waugh 2009-08-28 09:18:14 UTC
Oops, I put it a little further down in the file than I intended to.  Thanks for catching that!

Comment 13 Fedora Update System 2009-08-28 21:57:48 UTC
hplip-3.9.8-12.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update hplip'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-6959

Comment 14 Fedora Update System 2009-08-31 23:30:22 UTC
hplip-3.9.8-12.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.