Printing on PostScript printers (or printers with PostScript-based driver) not working

Bug #994477 reported by Marius B. Kotsbak on 2012-05-04
48
This bug affects 6 people
Affects Status Importance Assigned to Milestone
cups-filters (Ubuntu)
High
Unassigned
Precise
High
Unassigned

Bug Description

When I print a document, nothing is printed. This used to work before upgrading to Precise.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libreoffice (not installed)
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
Date: Fri May 4 11:02:03 2012
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
 TERM=xterm
 PATH=(custom, user)
 LANG=nb_NO.UTF-8
 SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: Upgraded to precise on 2012-04-27 (7 days ago)
---
ApportVersion: 2.0.1-0ubuntu7
Architecture: i386
DistroRelease: Ubuntu 12.04
InstallationMedia: Kubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
Lpstat: device for Phaser_6180MFP-N: socket://172.17.17.179:9100
MachineType: Dell Inc. PowerEdge SC430
NonfreeKernelModules: nvidia
Package: cups 1.5.2-9ubuntu1
PackageArchitecture: i386
Papersize: a4
PpdFiles: Phaser_6180MFP-N: Xerox Phaser 6180DN Foomatic/Postscript
ProcEnviron:
 LANGUAGE=nb_NO:nb:no_NO:no:nn_NO:nn:en
 TERM=xterm
 PATH=(custom, user)
 LANG=nb_NO.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-24-generic root=UUID=43d96c8e-a8ec-40f7-95f0-836266a82fff ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Tags: precise
Uname: Linux 3.2.0-24-generic i686
UpgradeStatus: Upgraded to precise on 2012-04-27 (7 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 10/03/2005
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A01
dmi.board.name: 0M9873
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 7
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA01:bd10/03/2005:svnDellInc.:pnPowerEdgeSC430:pvr:rvnDellInc.:rn0M9873:rvr:cvnDellInc.:ct7:cvr:
dmi.product.name: PowerEdge SC430
dmi.sys.vendor: Dell Inc.

Marius Kotsbak, thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 994477

As well, could you please attach all relevant information following https://wiki.ubuntu.com/DebuggingPrintingProblems ?

tags: added: regression-release
removed: regression
affects: libreoffice (Ubuntu) → cups (Ubuntu)
Changed in cups (Ubuntu):
status: New → Incomplete

apport information

tags: added: apport-collected
description: updated

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

apport information

I'm not sure if I have the same bug or not, but printing also no longer works for me after upgrading to Precise.

I see messages like

D [13/May/2012:08:18:17 -0400] [Job 294] Got USB transaction timeout during write

in the cups log, which looks different from the above, so maybe I have a different problem.

Adrian Mariano, please execute the following via the Terminal and feel free to subscribe me to it:
ubuntu-bug cups

Thanks!

Changed in cups (Ubuntu):
status: Incomplete → New

The problem is most probably caused by switching the pdftops CUPS filter from Poppler to Ghostscript and allowing higher image rendering resolutions when the pdftops filter has to turn graphical structures of the PDF input file into bitmaps when converting to PostScript and PostScript does not support these structures.

I have uploaded a cups-filters package to precise-proposed now which switches back to Poppler and limits the image rendering resolution to 360 dpi. Please test the package as soon as it gets available for download and give feedback here. This is required to make the new package an official update for Precise. Another comment with testing instructions will get posted here.

With the new package you can also test the behavior when switching between use of Poppler and Ghostscript and changing the resolution limit. Run the following commands in a terminal window for switching between Ghostscript and Poppler:

lpadmin -p <printer> -o pdftops-renderer-default=gs
lpadmin -p <printer> -o pdftops-renderer-default=pdftops

and

lpadmin -p printer -R pdftops-renderer-default

to remove the setting. To change the resolution limit run a command like

lpadmin -p <printer> -o pdftops-max-image-resolution-default=1440

and set unlimited resolution via

lpadmin -p <printer> -o pdftops-max-image-resolution-default=0

or remove your setting with

lpadmin -p <printer> -R pdftops-max-image-resolution-default

Always replace "<printer>" by your printer's queue name (enter "lpstat -v" to find your printer's queue name).

See also

/usr/share/doc/cups-filters/README.txt.gz

See and tell us in this bug report which works best for you.

A debdiff of the changes is attached.

Changed in cups (Ubuntu):
status: New → Fix Released
importance: Undecided → High
milestone: none → quantal-alpha-1
Changed in cups (Ubuntu Precise):
status: New → Fix Committed
importance: Undecided → High
milestone: none → precise-updates
affects: cups (Ubuntu) → cups-filters (Ubuntu)

The problem is most probably caused by switching the pdftops CUPS filter from Poppler to Ghostscript and allowing higher image rendering resolutions when the pdftops filter has to turn graphical structures of the PDF input file into bitmaps when converting to PostScript and PostScript does not support these structures.

I have uploaded a cups-filters package to precise-proposed now which switches back to Poppler and limits the image rendering resolution to 360 dpi. Please test the package as soon as it gets available for download and give feedback here. This is required to make the new package an official update for Precise. Another comment with testing instructions will get posted here.

With the new package you can also test the behavior when switching between use of Poppler and Ghostscript and changing the resolution limit. Run the following commands in a terminal window for switching between Ghostscript and Poppler:

lpadmin -p <printer> -o pdftops-renderer-default=gs
lpadmin -p <printer> -o pdftops-renderer-default=pdftops

and

lpadmin -p printer -R pdftops-renderer-default

to remove the setting. To change the resolution limit run a command like

lpadmin -p <printer> -o pdftops-max-image-resolution-default=1440

and set unlimited resolution via

lpadmin -p <printer> -o pdftops-max-image-resolution-default=0

or remove your setting with

lpadmin -p <printer> -R pdftops-max-image-resolution-default

Always replace "<printer>" by your printer's queue name (enter "lpstat -v" to find your printer's queue name).

See also

/usr/share/doc/cups-filters/README.txt.gz

See and tell us in this bug report which works best for you.

A debdiff of the changes is attached.

To the SRU team: The relevant changes for the fix are in the file filter/pdftops.c. The file in the debdiff looks very cluttered as there are many lines where only white space (indentation) changed. Attached to this comment is a cleaner diff for this file with white space changes ignored (diff -b), here one especially sees how the conditional compiling for Ghostscript/Poppler is replaced by "if"s so that the Ghostscript/Poppler decision can be made at run time.

Hello Marius, or anyone else affected,

Accepted cups-filters into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed

Another test you should try:

After having tested the proposed package without changing any default settings, run the following commands in a terminal window

lpadmin -p <printer> -o pdftops-renderer-default=gs
lpadmin -p <printer> -o pdftops-max-image-resolution-default=1440
lpadmin -p <printer> -o psdebug=true

with <printer> being the name of your print queue (You can find the name by ruuning the "lpstat -v" command).

After that try to print again. Does it work? If it works and if it is too slow, run

lpadmin -p <printer> -o pdftops-max-image-resolution-default=720

and try again. If it is still too slow, run

lpadmin -p <printer> -o pdftops-max-image-resolution-default=360

and try again.

Please report all your results here.

To get back to the default settings of the proposed package run the commands

lpadmin -p <printer> -R pdftops-renderer-default
lpadmin -p <printer> -R pdftops-max-image-resolution-default
lpadmin -p <printer> -R psdebug

Sebastien Bacher (seb128) wrote :

Marius, could you test if the update resolves your issue?

Marius B. Kotsbak (mariusko) wrote :

I will be able to test this in two weeks.

summary: - Printing not working
+ Printing on PostScript printers (or printers with PostScript-based
+ driver) not working

As the original poster of this bug report is not available in time for verifying this SRU, I ask everyone else reading this, especially the reporters of the duplicates and the people who reported "me too" via a comment or "Does this bug affect you?" to test the proposed package and report here whether it solved the problem. We need user feedback to be able to make the package an official update.

Please especially follow the instructions of comment #20. After that, follow also the instyructions of comment #18 and comment #21.

Installing cups-filters from precise-proposed fixed the problem for me.

I had enough trouble stumbling through the process of applying the fix, that perhaps someone with more experience could articulate the process clearly for other users.

I think the required steps I followed were:

1) Add precise-proposed through the Ubuntu Software Centre->Edit->Software Sources->Updates tab -> Pre-Released Updates check box.

2) Run Update Manager, deselect everything except OpenPrinting CUPS Filters, and apply the change.

Jordan, thank you for testing. Marking as verified.

tags: added: verification-done
removed: verification-needed

This also solved the PDF printer issue on my 12.04 installation (Brother printer). Bug 1005000, which I just marked as a duplicate. What's the best way, if possible, to apply this patch to an 11.10 installation?

Installing cups-filters from precise-proposed fixed the problem (bug 1004479) for me.

The test from #21 is a success. Printing still works as it should after the following commands:

lpadmin -p <printer> -o pdftops-renderer-default=gs
lpadmin -p <printer> -o pdftops-max-image-resolution-default=1440
lpadmin -p <printer> -o psdebug=true

Awesome! Thx. for fixing this so quickly!

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups-filters - 1.0.18-0ubuntu0.1

---------------
cups-filters (1.0.18-0ubuntu0.1) precise-proposed; urgency=low

  [ Till Kamppeter ]
  * New upstream release
     - pdftops: Allow selection whether Ghostscript or Poppler is used
       at runtime, setting the "pdftops-renderer" option to "gs" or
       "pdftops". This way one can switch to Poppler per-queue if there
       are incompatibilities with certain PostScript printers.
     - pdftops: Allow setting an upper limit for the image rendering
       resolution, also at runtime, setting the option
       "pdftops-max-image-resolution-default" to the desired limit in dpi.
       "0" means no limit.
     - pdftops: Fixed crash by wrong usage of sizeof() function when adding
       "Collate" to the fifth command line argument for the "pstops" CUPS
       filter call (LP: #982675).
     - pdftops: Removed newline from copies value when reading it from
       the "%%PDFTOPDFNumCopies" entry of the incoming PDF file.
     - pdftops: Silenced compiler warning about ignoring the return
       value of the write() function.
     - pdftops: Added a crash guard.
     - pdftops: Start determining the printing resolution with
       cupsRasterInterpretPPD(), this is the most reliable as often
       the choice names of the "Resolution" option are marketing names
       with higher numerical values than the actual resolution. Also
       ignore error exit values of cupsRasterInterpretPPD() as the
       function can error out after having found the resolution
       (LP: #984082).
     - pdftops: If printing resolution is determined by
       cupsRasterInterpretPPD() do not stick on 100 dpi if the
       resolution cannot be determined (LP: #984082).
  * debian/rules: Set default renderer for the pdftops filter to Poppler
    due to many printer's buggy interpreters having problems with GhostScript's
    PostScript and set image rendering resolution limit of the pdftops filter
    to 360 dpi to prevents slow processing by the printer if very high
    resolutions are used or if the printing resolution is mis-detected by the
    pdftops filter (LP: #668800, LP #951627 (comment #30), LP: #998087,
    LP: #992982 (comments #26, #27, #30, #31), LP: #997728, LP: #994477,
    LP: #998087, LP: #978120, LP: #862167).

  [ Didier Raboud ]
  * Drop libtiff5-dev, just use libtiff-dev, this fixes the FTBFS due to
    incompatibility with cups.
 -- Till Kamppeter <email address hidden> Wed, 16 May 2012 11:25:03 +0200

Changed in cups-filters (Ubuntu Precise):
status: Fix Committed → Fix Released

ive tried what it says in here, but it is still a problem to me, i cant print pdfs.

Marius B. Kotsbak (mariusko) wrote :

If you have installed all updates, please open a new bug report.

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

Other bug subscribers

Related questions