Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 288751 - net-print/hplip-3.9.8 bottom on printout cut off
Summary: net-print/hplip-3.9.8 bottom on printout cut off
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Printing Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 17:47 UTC by John Feuerstein
Modified: 2010-03-06 20:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Feuerstein 2009-10-12 17:47:40 UTC
I'm using an HP Officejet 5610 with DIN A4 paper.
After upgrading hplip from 3.9.4b-r1 to 3.9.8 suddenly all my printouts are cut off at the bottom. Comparing two identical pages, one printed using 3.9.4b-r1 and the other with 3.9.8, I can see the latter one starts lower on the page. It looks like the printable area starts lower by ~10mm and because of that, the bottom gets cut off.

When switching hplip versions, I always do the following:
1. Delete matching CUPS printers
2. Restart CUPS
3. Emerge hplip
4. Run hp-setup (keep everything on default)
... just to be sure it's a clean setup.

The default pagesize is set to A4 in CUPS and also when printing from OO.org.

Let me know if you need more information. Thanks.

[I] net-print/hplip
     Available versions:  2.8.6b (~)3.9.4b-r1 [m](~)3.9.8 {+cups cupsddk dbus doc fax gtk minimal parport policykit ppds qt3 qt4 scanner snmp}
     Installed versions:  3.9.4b-r1(05:21:38 PM 10/12/2009)(cupsddk dbus fax gtk scanner snmp -doc -minimal -parport -policykit -ppds -qt3 -qt4)
     Homepage:            http://hplip.sourceforge.net/
     Description:         HP Linux Imaging and Printing System. Includes net-print/hpijs, scanner drivers and service tools.

[I] net-print/foomatic-filters
     Available versions:  3.0.20060720 (~)3.0.20070501 3.0.20080507 {cups}
     Installed versions:  3.0.20080507(01:00:35 AM 04/27/2009)(cups)
     Homepage:            http://www.linuxprinting.org/foomatic.html
     Description:         Foomatic wrapper scripts

[I] net-print/cups
     Available versions:  1.3.10-r2!t (~)1.3.11!t (~)1.4.1!t {X acl avahi dbus debug gnutls java (+)jpeg kerberos ldap linguas_de linguas_en linguas_es linguas_et linguas_fr linguas_he linguas_id linguas_it linguas_ja linguas_pl linguas_sv linguas_zh_TW pam perl php (+)png ppds python samba slp (+)ssl static (+)tiff xinetd zeroconf}
     Installed versions:  1.4.1!t(07:50:43 PM 09/13/2009)(X acl dbus gnutls java jpeg pam perl png python samba ssl tiff xinetd -debug -kerberos -ldap -php -slp -static -zeroconf)
     Homepage:            http://www.cups.org/
     Description:         The Common Unix Printing System.
Comment 1 Daniel Pielmeier gentoo-dev 2009-10-14 18:33:35 UTC
I experience the same problem here.
Comment 2 Daniel Pielmeier gentoo-dev 2009-10-15 12:45:17 UTC
Can you try installing hplip-3.9.8-r2 with the following use flags USE="-hpcups +hpijs" others you can leave at defaults. Then reconfigure with hp-setup and check if the problem persists.
Comment 3 John Feuerstein 2009-10-15 13:08:42 UTC
The problem persists :-(

1: Delete CUPS printer

2:
$ USE="-hpcups hpijs" emerge -av =net-print/hplip-3.9.8-r2

These are the packages that would be merged, in order:

Calculating dependencies ... done!
[ebuild     U ] net-print/hplip-3.9.8-r2 [3.9.4b-r1] USE="fax gtk hpijs%* libnotify%* scanner snmp -doc -hpcups% -minimal -parport -policykit -qt3 -qt4 -static-ppds% -udev-acl% (-cupsddk%*) (-dbus%*) (-ppds%)" 0 kB
...
$ etc-update
...
Replacing /etc/hp/hplip.conf with /etc/hp/._cfg0000_hplip.conf
...

3:
$ hp-setup # with defaults

4: Print. Same Problem as with 3.9.8.
Comment 4 Daniel Pielmeier gentoo-dev 2009-10-15 13:20:00 UTC
I thought this was upstream bug [1]405116. You also restarted cups this time?

[1] https://bugs.launchpad.net/hplip/+bug/405116
Comment 5 John Feuerstein 2009-10-15 13:47:00 UTC
Yes, I restarted CUPS after step 1. Sorry to not mention it.

I'm not really into it, but I re-did everything and during hp-setup it states:

-------------------------------- snip ----------------------------------
Using queue name: Officejet_5600
Locating PPD file... Please wait.
error: No PPD found for model officejet_5600 using new algorithm. Trying old algorithm...

Found PPD file: drv:///hp/hpcups.drv/hp-officejet_5600_series.ppd
-------------------------------- snap ----------------------------------

Why hpcups.drv, we disabled that with the USE flag -hpcups?!

So what I did now is downgrade to 3.9.4b-r1, and I noticed this difference:
PPD file: drv:///hp/hpijs.drv/hp-officejet_5600_series-hpijs.ppd

The URI looks fine and uses hpijs (probably because hpcups was not available with that version...).
Comment 6 Daniel Pielmeier gentoo-dev 2009-10-15 14:12:14 UTC
I think I made an error in the ebuild so hpcups is built even if -hpcups is set. Will fix this in the evening. Is there a possiblility to choose the driver when running hp-setup so you can set this to hpijs.
Comment 7 John Feuerstein 2009-10-15 16:59:57 UTC
No, no such option. The ebuild is probably wrong because you forgot to explicitely disable some "default=yes" configure option.

Anyways, I'd like to use the new hpcups driver instead of hpijs because of sane defaults ("Normal = 600dpi" etc.) -- So I've looked a bit further and finally found the bug. It looks like some HP dev defined a wrong CustomMedia size for A4.

I've imported the PPD compiler source from the PPD file of both 3.9.4b-r1 (foomatic...) and 3.9.8-r2 (USE="hpcups"!) in /etc/cups/ppd/Officejet_5600.ppd and did a diff on them, here are the important lines from each one respectively:

# hplip-3.9.4b-r1:
CustomMedia "A4/A4 210x297mm" 595.00 842.00 10.00 36.00 10.00 9.00
HWMargins 18.00 36.00 18.00 36.00

# hplip-3.9.8-r2:
CustomMedia "A4/A4 210x297mm" 595.44 841.68 18.00 36.00 18.00 9.00
HWMargins 9.00 36.00 9.00 36.00

# hplip-3.9.8-r2 *FIXED*:
CustomMedia "A4/A4 210x297mm" 595.44 841.68 9.00 36.00 9.00 36.00
HWMargins 9.00 36.00 9.00 36.00

The PPDs were imported using ppdi(1). After compiling the fixed PPD source using ppdc(1) again, moving it to /etc/cups/ppd/Officejet_5600.ppd and restarting CUPS, everything is fine. Printouts are NOT cut off anymore and start early on the page, just like with 3.9.4b-r1 :-)

OK, so what's wrong here? I hardcoded CustomMedia margins for A4 that match HWMargins. Reading the documentation[1] for the syntax:

CustomMedia "name/text" width length left bottom right top
    "size-code" "region-code"

HWMargins left bottom right top

Points are assumed if no units are specified.

Question 1: Why did they change HWMargins in the first place?
Question 2: What are the _correct_ margin settings for A4 now?


[1] http://www.cups.org/documentation.php/ref-ppdcfile.html
Comment 8 Daniel Pielmeier gentoo-dev 2009-10-15 18:53:21 UTC
(In reply to comment #7)
> No, no such option. The ebuild is probably wrong because you forgot to
> explicitely disable some "default=yes" configure option.

I have committed hplip-3.9.8-r3 which fixes this. Thanks for pointing me at it.
Comment 9 Daniel Pielmeier gentoo-dev 2009-10-15 19:01:14 UTC
(In reply to comment #7)
> OK, so what's wrong here? I hardcoded CustomMedia margins for A4 that match
> HWMargins. Reading the documentation[1] for the syntax:

I tried the same procedure here but with the resulting ppd file I was not able to print at all. Btw thanks for pointing hplip upstream at this bug.
Comment 10 John Feuerstein 2009-10-15 19:59:33 UTC
Humm, did you compile the PPD source file?

Step by step how I did it:

1. Remove CUPS printer
2. Restart CUPS, the PPD in /etc/cups/ppd/ should be gone.
3. Emerge hplip-3.9.8 with USE="hpcups -hpijs"
4. hp-setup, the resulting non-foomatic PPD should be in /etc/cups/ppd/.

5:
$ cd /etc/cups/ppd
$ ppdi -o fixme.drv Officejet_5600.ppd
$ ... edit fixme.drv and change this line:
  CustomMedia "A4/A4 210x297mm" 595.44 841.68 18.00 36.00 18.00 9.00 ...
to:
  CustomMedia "A4/A4 210x297mm" 595.44 841.68 9.00 36.00 9.00 36.00 ...
$ ppdc fixme.drv
$ mv ppd/hp-officejet_5600_series.ppd Officejet_5600.ppd
$ /etc/init.d/cupsd restart

6: Print.

Just did it again -- Works fine here :-)
Comment 11 Daniel Pielmeier gentoo-dev 2009-10-15 20:41:35 UTC
(In reply to comment #10)
> Humm, did you compile the PPD source file?
> 
> Step by step how I did it:
> 
> 1. Remove CUPS printer
> 2. Restart CUPS, the PPD in /etc/cups/ppd/ should be gone.
> 3. Emerge hplip-3.9.8 with USE="hpcups -hpijs"
> 4. hp-setup, the resulting non-foomatic PPD should be in /etc/cups/ppd/.
> 
> 5:
> $ cd /etc/cups/ppd
> $ ppdi -o fixme.drv Officejet_5600.ppd
> $ ... edit fixme.drv and change this line:
>   CustomMedia "A4/A4 210x297mm" 595.44 841.68 18.00 36.00 18.00 9.00 ...
> to:
>   CustomMedia "A4/A4 210x297mm" 595.44 841.68 9.00 36.00 9.00 36.00 ...
> $ ppdc fixme.drv
> $ mv ppd/hp-officejet_5600_series.ppd Officejet_5600.ppd
> $ /etc/init.d/cupsd restart
> 
> 6: Print.
> 
> Just did it again -- Works fine here :-)
> 

I did exactly this, besides I had to use other values as were other changes for my Business Inkjet 1000.

I also tried the hpijs driver with the same result.
Comment 12 Jon Hurst 2010-03-05 14:23:42 UTC
Info here:

http://hplipopensource.com/node/340

Margins were broken on ghostscript-gpl-8.64-r3, but work properly on ghostscript-gpl-8.64-r3 (needs ~x86 keyword at the moment)
Comment 13 Daniel Pielmeier gentoo-dev 2010-03-05 14:45:25 UTC
(In reply to comment #12)
> Info here:
> http://hplipopensource.com/node/340
> Margins were broken on ghostscript-gpl-8.64-r3, but work properly on
> ghostscript-gpl-8.64-r3 (needs ~x86 keyword at the moment)

You mean ghostscript-gpl-8.70.
In hplip-3.10.2 I already depend on >=ghostscript-gpl-8.70 because of this note. Please try if this version fixes your problem.
Comment 14 John Feuerstein 2010-03-05 17:08:53 UTC
The originally reported bug is fixed.

I've deleted the CUPS printers, restarted CUPS, emerged...

app-text/ghostscript-gpl-8.71  USE="X cairo cups djvu gtk jpeg2k -bindist"

net-print/hplip-3.10.2  USE="fax gtk hpcups libnotify scanner snmp -doc -hpijs -minimal -new-hpcups -parport -policykit -qt4 -static-ppds -udev-acl"

..., ran hp-setup...

Found PPD file: drv:///hp/hpcups.drv/hp-officejet_5600_series.ppd

... and everything is fine now. Margins are perfect and I'm happy using hpcups now (sane quality defaults and human-readable quality descriptions... not everyone using a cups printer should have to know what 300dpi is. Draft, Normal, Photo ... so all non-techies here are happy now too).

Thanks for the continued support everyone.
Comment 15 Jon Hurst 2010-03-06 20:23:52 UTC
> You mean ghostscript-gpl-8.70.

Indeed I do - it had been a long day. For the record hplip-3.9.12-r1 and ghostscript-gpl-8.71 give perfect results.