Too large amounts of data sent when printing images

Bug #675863 reported by Jibo HE
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cairo (Ubuntu)
Confirmed
High
Unassigned
ghostscript (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: cups

Hello,

For printing a image of small size, say, about 150 KB, more than 50 MB data are sent to the network printer (a Cannon C2550). This blocked all the other printing tasks in the queue, and is really a big trouble for me. Now I have to ask some colleague using Windows to print Google map for me. This problem only happens for image (e.g., .jpg), and for PDF file or open office file, there is no such problem.

It is Ubuntu 10.10, upgraded from 8.10 continuously. If I remember, I think I started to suffered this problem since 9.10. Hereafter is the CPUS pacakges. Please let me know if you need more information to identify the problem. Just tell me how to do it, I would be very happy to help understanding this problem.

Many thanks!

dpkg --list | grep cups
ii bluez-cups 4.69-0ubuntu2 Bluetooth printer driver for CUPS
ii cups 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - server
ii cups-bsd 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - BSD commands
ii cups-client 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - client programs (SysV)
ii cups-common 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - common files
ii cups-driver-gutenprint 5.2.6-0ubuntu8 printer drivers for CUPS
ii cups-ppdc 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - PPD manipulation utilities
ii cupsddk 1.4.4-6ubuntu2.2 Common UNIX Printing System (transitional package)
ii ghostscript-cups 8.71.dfsg.2-0ubuntu7 The GPL Ghostscript PostScript/PDF interpreter - CUPS filters
ii hal-cups-utils 1.2.3+20100723-0ubuntu8.1 CUPS integration with HAL
ii hplip-cups 3.10.6-1ubuntu10.1 HP Linux Printing and Imaging - CUPS Raster driver (hpcups)
ii libcups2 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - Core library
ii libcupscgi1 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - CGI library
ii libcupsdriver1 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - Driver library
ii libcupsimage2 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - Raster image library
ii libcupsmime1 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - MIME library
ii libcupsppdc1 1.4.4-6ubuntu2.2 Common UNIX Printing System(tm) - PPD manipulation library
ii libgnomecups1.0-1 0.2.3-3build2 GNOME library for CUPS interaction
ii python-cups 1.9.51-0ubuntu2 Python bindings for CUPS
ii python-cupshelpers 1.2.3+20100723-0ubuntu8.1 Python modules for printer configuration with CUPS
---
Architecture: amd64
DistroRelease: Ubuntu 10.10
Lpstat:
 device for 2-cor-hp: lpd://2-cor-hp.print.cern.ch/2-cor-hp
 device for 2-r-lhcb: lpd://2-r-lhcb.print.cern.ch/2-r-lhcb
 device for Generic-text-only-printer: ///dev/null
 device for pasteque: lpd://pasteque.lal.in2p3.fr/print
 device for printemps: socket://134.158.88.136:9100
MachineType: Dell Inc. Latitude E6400
Package: cups 1.4.4-6ubuntu2.2
PackageArchitecture: amd64
Papersize: letter
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
PpdFiles:
 printemps: Canon imageRunner C2550 Foomatic/pxlcolor (recommended)
 pasteque: KONICA MINOLTA 500/420/360PS(P)
 2-cor-hp: HP LaserJet p4515x, hpcups 3.10.6
 2-r-lhcb: HP LaserJet P3005 Postscript (recommended)
ProcCmdLine: root=UUID=133b9ba5-e3a6-4760-b355-4b2b709d90ea ro quiet splash
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, no user)
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-23.37-generic 2.6.35.7
Tags: maverick
Uname: Linux 2.6.35-23-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 09/01/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A03
dmi.board.name: 0RX493
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA03:bd09/01/2008:svnDellInc.:pnLatitudeE6400:pvr:rvnDellInc.:rn0RX493:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E6400
dmi.sys.vendor: Dell Inc.

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

Can you attach a sample input file and also tell us with which application you have printed it? Can you also follow the instructions of "CUPS error_log" and "Capturing print job data" in https://wiki.ubuntu.com/DebuggingPrintingProblems? Do not hesitate to attach big files and do not compress the files you attach.

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Jibo HE (jibo-he) wrote : BootDmesg.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Jibo HE (jibo-he) wrote : CupsErrorLog.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : Dependencies.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : Locale.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : Lspci.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : Lsusb.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : PrintingPackages.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : ProcModules.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : UdevDb.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : UdevLog.txt

apport information

Revision history for this message
Jibo HE (jibo-he) wrote : Re: Too large data sent while printing images using network printer

Hello,

I attached an image file. As you can see, it is only 126.2 KB. And I did a test just now with different applications, you can find the size of data sent to the network printer (with name: printemps):
1) Eye of GNOME 2.32.0
    83 MB
2) FireFox 3.6.12
    63 MB
3) GIMP 2.6.10
    83 MB
4) Shotwell 0.7.2
    82 MB

So I guess the problem is not caused by the application?

Many thanks.

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

It is really not caused by the individual applications, but also not by CUPS. The sizes you see are the sizes of the files generated by the applications and sent to CUPS when printing. These files are generated by functions of the library libcairo which is used by all the mentioned applications. So one problem is libcairo making big print files. Another problem is Ghostscript. It converts the PDF files sent by the applications into the printer's native language. Unfortunately, it has performance problems with images embedded into PDF files and especially PDF files from libcairo. See bug 668800.

Compared to the memory sizes of modern PCs and printers the files are not so big, the real problem is the way how libcairo makes them and the way how Ghostscript renders them. Moving to libcairo and Ghostscript.

affects: cups (Ubuntu) → ghostscript (Ubuntu)
Changed in ghostscript (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Confirmed
Changed in libcairo (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Jibo HE (jibo-he) wrote :

Thanks a lot for prompt replies. I also followed https://wiki.ubuntu.com/DebuggingPrintingProblems and got the debug logging (error_log) mentioned in the "CUPS error_log" section and the "printout" mentioned in the "Capturing print job data" section. I attached them now in case they are still useful.

Revision history for this message
Jibo HE (jibo-he) wrote :
affects: libcairo (Ubuntu) → cairo (Ubuntu)
Changed in cairo (Ubuntu):
importance: Medium → High
Changed in ghostscript (Ubuntu):
importance: Medium → High
summary: - Too large data sent while printing images using network printer
+ Too large amounts of data sent when printing images
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Several improvements were done on the Ghostscript as it ships with Oneiric (version 9.04). Please try an Oneiric live CD (Alpha 3) and check whether the situation improved. Tell your experience here.

Revision history for this message
cosmix (cosm7x) wrote :

Till, following our conversation back in September 2010 (see duplicate bug, #597338), there are multiple issues with printing on Ubuntu that persist in 11.04; some may have to do with Ghostscript, but the vast majority of issues that I have experienced were (and remain) cairo related, not Ghostscript related. Specifically the main issue that has long rendered Ubuntu (under Gnome) unusable for me with regards to printing were issues related to bad authoring by cairo which resulted in my postscript printers failing to print completely. Are there any news on this front?

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

As far as I know improvements on Cairo have been done, but I do not remember when they were done, whether they were before or after September 2010. But the improvements in Ghostscript 9.04 should have made Ghostscript coping much better with bad-quality PDF input than the Ghostscript of 11.04. So it is worth testing Oneiric. And if there are still files which fail, please attach them here. Thanks.

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

I tried printing the jpeg file attached with eog and a 978KB PS file is sent to my printer. So it is more likely that ghostscript is causing the huge file sizes.

Also, cairo versions >= 1.10 support embedding compressed jpeg images in the PS/PDF output. But I'm not aware of any applications using this API. eog obviously is not using it otherwise the print job size would be a lot closer to the jpeg file size.

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

Adrian, to find out whether the Cairo or Ghostscript is the culprit for large output files, you need to either print into a PDF file by selecting the appropriate entry in the printer list in eog's printing dialog or you should follow the instructions in the section " Capturing print job data" on https://wiki.ubuntu.com/DebuggingPrintingProblems.

If eog is not using the latest and best APIs of Cairo, please report a bug on eog.

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

Till, that is exactly what I did. As I said the PS print job size sent to my PS printer is 978KB. Comment 18 also contains the captured PDF print job which is 400KB.

If you have any evidence of cairo blowing up images to be 500x the original image, please file a bug at http://bugs.freedesktop.org/ and attach the source image or PDF file.

The eog bug is https://bugzilla.gnome.org/show_bug.cgi?id=394260

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

cosmix, I'm not aware of any printing issues that are caused by cairo. If you know of any please file a bug at http://bugs.freedesktop.org/ or subscribe me to the Ubuntu bug.

The problem of cairo printing monochrome or grayscale images as RGB images has been fix in cairo git.

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

Adrian, getting 978KB PostScript output out of 400KB PDF input is normal. PDF is more compact than PostScript. So Ghostscript, Poppler, or any other filter in the chain behave correctly. So there is no problem any more on the CUPS/Ghostscript/Poppler/filter side for you any more.

Also the 400kB input is not too big for an image. So for me everything looks OK now.

So I will close the Ghostscript task. If anyone has still problems, please reopen.

Changed in ghostscript (Ubuntu):
status: Confirmed → Fix Released
madbiologist (me-again)
tags: added: karmic lucid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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