Printed pdfs are not centered, top margins cut off

Bug #872160 reported by Matthias Rosenkranz
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
HPLIP
Confirmed
Undecided
Unassigned
hplip (Ubuntu)
Triaged
High
Unassigned

Bug Description

After upgrading to Oneiric, pdfs printed through either evince or acroread are not centered despite selecting "Auto rotate and center" and page scaling "fit to printable area". This also causes text close to the top margin (e.g. chapter titles etc.) to be cut off in print. The pdfs are typically letter but the printer has A4 paper. The same printer had no problems in Natty, where the pages looked centered and were not cut off.

I'm not sure if cups or any other step in the printing pipeline is at fault.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cups 1.5.0-8ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Tue Oct 11 16:01:11 2011
Lpstat:
 device for Canon-iP4200: usb://Canon/iP4200
 device for HP-Color-LaserJet-5550: smb://entares.math.nus.edu.sg/S17_level4_clj1
 device for HP-LaserJet-4050: smb://entares.math.nus.edu.sg/S17_level4_duplex
 device for HP-LaserJet-p4015dn: smb://entares.math.nus.edu.sg/S17_level7_duplex
MachineType: LENOVO 200749G
Papersize: a4
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
PpdFiles:
 HP-LaserJet-4050: HP LaserJet 4050 Series Postscript (recommended)
 HP-Color-LaserJet-5550: HP Color LaserJet 5550 v3010.107 Postscript (recommended)
 HP-LaserJet-p4015dn: HP LaserJet p4015dn, hpcups 3.11.7
 Canon-iP4200: Canon PIXMA iP4200 - CUPS+Gutenprint v5.2.7 Simplified
ProcEnviron:
 LANGUAGE=en_SG:en
 PATH=(custom, user)
 LANG=en_SG.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.0.0-12-generic root=/dev/mapper/VolGroup01-LogVol02 ro quiet splash vt.handoff=7
SourcePackage: cups
UpgradeStatus: Upgraded to oneiric on 2011-10-03 (8 days ago)
dmi.bios.date: 06/12/2006
dmi.bios.vendor: LENOVO
dmi.bios.version: 79ET62WW (1.07 )
dmi.board.name: 200749G
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr79ET62WW(1.07):bd06/12/2006:svnLENOVO:pn200749G:pvrThinkPadT60:rvnLENOVO:rn200749G:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 200749G
dmi.product.version: ThinkPad T60
dmi.sys.vendor: LENOVO

Revision history for this message
Matthias Rosenkranz (rose) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can you attach a sample PDF?

can you follow the instructions of the sections "Capturing print job data" and "CUPS error_log" of https://wiki.ubuntu.com/DebuggingPrintingProblems? Thanks.

It seems that letter-sized PDFs get placed into the upper-left corner of the A4-sized frame.

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Matthias Rosenkranz (rose) wrote :

Sorry, it's probably just a temporary problem with this particular printer. I've tried a different printer and that centered the pdf correctly.

Anyway, I've followed the instructions and attach the resulting printout file and the original pdf.

Revision history for this message
Matthias Rosenkranz (rose) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The attached file printout looks correctly centered for me. Does this file actually print badly centered?

Revision history for this message
Matthias Rosenkranz (rose) wrote :

Yes, it prints off-center but only on one particular printer as I found out later. It's likely that just the printer is at fault or I messed up its settings.

Revision history for this message
Martin Vogel (marvodor) wrote :

This bug affects my HP LaserJet 6P, too. It is independent from the content of the pdf. LibreOffice Writer documents are being printed with one of the margins on the short side of the page set to zero, too. The page content is being clipped because it overlaps with the non-printing page border on this side of the page.

This error occurs
- when printing PDF documents from Ubuntu 10.10 directly on the HP LaserJet 6P with evince
- when printing LibreOffice documents from Ubuntu 10.10 directly on the HP LaserJet 6P with LibreOffice Writer

The page margins are correctly rendered
- when printing any documents from Ubuntu 10.10 directly or over the network on a HP DeskJet printer
- when printing any documents from Ubuntu 10.04 over the network on the HP LaserJet 6P which is connect to a PC with Ubuntu 10.10
- when printing any documents from Ubuntu 10.10 over the network on a HP LaserJet 5000 (Postscript) which is connected to a Windows machine

The only paper size I use is ISO A4.

Revision history for this message
Martin Vogel (marvodor) wrote :

There is an error description in German language at http://forum.ubuntuusers.de/topic/satzspiegel-wird-an-den-oberen-rand-gerueckt/#post-3612757

Also affected are the printer models HP LaserJet 1100 and Samsung CLP-310N, it says. After the driver of the Samsung printer was being changed from "Samsung SPL-C"" to "Foomatic/foo2qpdl" this particular error was gone.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can everyone who has this problem please attach the following for the printer and for a job where the problem occurs:

1. The PPD file of the printer: /etc/cups/ppd/<print queue name>.ppd
2. Original file which you tried to print
3. error_log as described in "CUPS error_log" on https://wiki.ubuntu.com/DebuggingPrintingProblems
4. Captured print job as described in "Capturing print job data" on https://wiki.ubuntu.com/DebuggingPrintingProblems

Do not compress or package together the attachments. It is no problem to post several comments to get all the files attached.

Please tell also how/with which application you printed the file.

Attach the above set of files for each printer with which you have the problem.

Tell also whether you have other printers on which the problem does not occur. Tell us mnake, model, and driver, and attach the PPD file of each of these printers: /etc/cups/ppd/<print queue name>.ppd

Revision history for this message
Asaf (amanela) wrote :

I had this problem on 11.10 64bit with my HP LaserJet p4015 and managed to fix it by trial and error (so not sure which one did it):

1. Installed HPLIP Toolbox
2. Deleted Printer
3. Added printer from within HPLIP and selected the "XX Postscript (recommended)" driver

I'm attaching the "good" and "bad" ppd files in case it help to investigate.

Revision history for this message
knurxs (knurxs) wrote :

I have/had the same issue for a HP LaserJet 1320n printer after upgrading to 11.10 (32 bit)

Printing from Firefox, LibreOffice, Okular results in a print-out shifted by 7.5mm (3*2.54mm ??) upwards (left and right borders are okay).

My findings:
hp-laserjet_1320n.ppd (hpcups 3.11.7) does the job wrong (as described above)
hp-laserjet_1320n-hpijs.ppd (hpijs 3.11.7) does the job correct

Hope this helps to isolate the root cause.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Can everyone please follow my instructions of comment #9, especially I need the complete set of error_log, captured printout file, and PPD file.

Revision history for this message
DottorBartolo (dottorbartolo) wrote :

Hi Till!
I have the same problem. The documents are printed with a shift of 2-3cm towards the top. Quite interestingly, though, if I print the test page, that comes out perfectly centered. This problem occurs with different printers too. I'm attaching the documents you asked for.

Revision history for this message
DottorBartolo (dottorbartolo) wrote :

the ppd file

Revision history for this message
DottorBartolo (dottorbartolo) wrote :

the printout file

Revision history for this message
DottorBartolo (dottorbartolo) wrote :

and finally the error log

Revision history for this message
DottorBartolo (dottorbartolo) wrote :

A final comment: the printout file is actually well centered. That's not the case with the actual printed document (I used adobe reader to print).

Revision history for this message
Antanas (br-justinas) wrote :

Hello!
After new installation of Ubuntu 11.10, the top margin disapeared with HP LaserJet 1150.
Thank you!

Revision history for this message
Antanas (br-justinas) wrote :
  • Test.odt Edit (8.5 KiB, application/vnd.oasis.opendocument.text)

original file:

Revision history for this message
Antanas (br-justinas) wrote :

error_log:

Revision history for this message
Antanas (br-justinas) wrote :

printout:

(Scanner HP ScanJet 3670 didn't found... Anyway, the top margin is 2-3 mm)

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Going through all attached PPD files it shows that the problem does not occur with PostScript PPDs and with the HPIJS driver (an IJS driver) and with Foomatic/foo2qpdl (Ghostscript generates pbmraw or bitcmyk bitmap graphics and pipes that into the foo2qpdl filter). It occurs with the hpcups driver (a CUPS Raster driver), Samsung's SPL-C driver (probably also CUPS Raster).

So the problem seems to be in the CUPS Raster output of Ghostscript.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I can only reproduce the bug if I use an hpcups PPD for a black-and-white printer, like the HP LaserJet p4015. It does not occur with an hpcups PPD for a color laser like the HP Color LaserJet CM3530 MFP.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Taking the Ghostscript command line from my error_log of printing test.pdf out of evince to the HP LaserJet p4015 with hpcups driver and running it in a terminal window:

cat test.pdf | PPD=/etc/cups/ppd/7.ppd /usr/bin/gs -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -sMediaType=Plain -sOutputType=0 -dDuplex -r600x600 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=841 -dcupsBitsPerColor=1 -dcupsColorOrder=0 -dcupsColorSpace=3 -dcupsRowCount=1 -dcupsRowStep=2 -dcupsInteger0=26 -scupsPageSizeName=A4 -I/usr/share/cups/fonts -c -f -_ > test.raster

and then displaying test.raster with

rasterview test.raster

does not show any irregularity. The raster file makes the impression that it would get printed correctly. I also get correct raster files for 1111.0107.pdf.

Note also that the two examples are Letter-sized PDFs, but I get the same problem with A4-sized PDFs. The problem always occure when printing PDFs from evince into the queue for the HP LaserJet p4015 with hpcups (the "bad" PPD of comment #10).

So it seems to be a bug in hpcups, moving the bug to HPLIP ...

I attach my error_log, consider all the jobs for the HP LaserJet p4015 (queue name "7") as having the problem and jobs for the queue name "HP-Color-LaserJet-CM3530-MFP" as not having the problem.

affects: cups (Ubuntu) → hplip (Ubuntu)
Changed in hplip (Ubuntu):
status: Incomplete → Confirmed
Changed in hplip:
status: New → Confirmed
Changed in hplip (Ubuntu):
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

rasterview you can get at

http://www.easysw.com/~mike/rasterview/index.html

To compile it you must have build-essential, libfltk1.1-dev, libcups2-dev, and libcupsimage2-dev installed.

Revision history for this message
Jiri Popelka (jpopelka) wrote :

Till, there's a patch in bug #890684 that some Fedora users confirmed as a work-around to this problem.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Jiri, thanks. It works. I will apply this to our HPLIP package and issue a Stable Release Update (SRU) for Oneiric.

Changed in hplip (Ubuntu):
status: Confirmed → Triaged
milestone: none → oneiric-updates
Revision history for this message
Montblanc (montblanc) wrote :

Still affected on quantal

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.