Ubuntu

Cannot print from pdf, /usr/lib/cups/filter/pdftoraster failed

Reported by James Clemence on 2010-09-01
54
This bug affects 12 people
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
High
ghostscript (Ubuntu)
High
Unassigned

Bug Description

Binary package hint: cups

Any pdf I attempt to print from evince fails with the following printer state message. I use an Epson Stylus Photo RX500, which has had no problems with previous ubuntu versions. Test page printing works, it is just the raster process for pdf files which appears to fail.

J

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: cups 1.4.4-3
ProcVersionSignature: Ubuntu 2.6.35-19.28-generic 2.6.35.3
Uname: Linux 2.6.35-19-generic x86_64
Architecture: amd64
Date: Wed Sep 1 13:16:47 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha amd64 (20100803.1)
Lpstat: device for Stylus-Photo-RX500: usb://EPSON/Stylus%20Photo%20RX500
MachineType: System manufacturer System Product Name
Papersize: a4
PpdFiles: Stylus-Photo-RX500: Epson Stylus Photo RX500 - CUPS+Gutenprint v5.2.6 Simplified
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-19-generic root=UUID=639b4ea6-f8c1-4cf5-b228-f0b89b93618f ro quiet splash
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: cups
dmi.bios.date: 04/20/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 2505
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: M4A78-E
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr2505:bd04/20/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnM4A78-E:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

James Clemence (jvc26) wrote :
Till Kamppeter (till-kamppeter) wrote :

Unfortunately, your error_log does not contain the needed information. Can you supply an error_log as described under "CUPS error_log" on https://wiki.ubuntu.com/DebuggingPrintingProblems?

Can you also attach one or more of the PDF files which you were not able to print.

James Clemence (jvc26) wrote :

Attached is the error_log

James Clemence (jvc26) wrote :

I can't attach the main pdf as it is an article from the Lancet which you have to be a subscriber to view. I'll try and find a different one.

J

James Clemence (jvc26) wrote :

See the attached.

J

James Clemence (jvc26) wrote :

As the above. (but with the latest file attached).

J

Till Kamppeter (till-kamppeter) wrote :

Unfortunately, your attached PPD file renders just fine for me, even with your PPD file and the Ghostscript command line taken from your error_log.

Can you please also attach your /var/log/syslog file, so that we can spot segmentation faults.

James Clemence (jvc26) wrote :

Syslog

James Clemence (jvc26) wrote :

Hmm, I think the latter pdf failed with a different issue, I can't really put the other articles up here.

J

All failed jobs failed due to a segmentation fault of Ghostscript which one can easily see when comparing the error_log with the syslog.

Can you send me one of the articles in a private e-mail?

Thank you for mailing me the article.

I have now succeeded to reproduce the problem and identified it as a bug of Ghostscript. It happens with both Ghostscript 8.71 as shipped with Maverick and Ghostscript 9.00 (to be released upstream soon). I have filed the following upstream bug report:

http://bugs.ghostscript.com/show_bug.cgi?id=691586

To reproduce the problem take the printing output of evince captured from the spool directory of CUPS (attached) and run it through the following command line:

cat cv_libertine-evince.pdf | RIP_MAX_CACHE=256M PPD=/etc/cups/ppd/Stylus-Photo-RX500.ppd gs -dNOPAUSE -dBATCH -sDEVICE=cups -r720x360 -dcupsBitsPerColor=8 -dcupsColorSpace=0 -_ > out.raster

A workaround for the time being run the following commands in a terminal window:

cancel -a
cupsctl RIPCache=auto

affects: cups (Ubuntu) → ghostscript (Ubuntu)
Changed in ghostscript (Ubuntu):
importance: Undecided → High
status: New → Confirmed

I attach also the PPD file for easier reproducing via

cat cv_libertine-evince.pdf | RIP_MAX_CACHE=256M PPD=rx500.ppd gs -dNOPAUSE -dBATCH -sDEVICE=cups -r720x360 -dcupsBitsPerColor=8 -dcupsColorSpace=0 -_ > out.raster

Note that the system is amd64/x86_64. On other systems you need perhaps to choose a higher value for RIP_MAX_CACHE.

Changed in gs-gpl:
status: Unknown → Confirmed

We are also looking for a bug in Apport (the automatic bug reporting system). The segmentation faults of Ghostscript should have triggered an additional automatic bug report which you did not get (you got only an automatic bug report triggered by a failed print job). To find out why it happened this way, can you attach the file

/var/log/apport.log

Thanks.

James Clemence (jvc26) wrote :

Here

Thank you very much,

Are you able to print after entering

cancel -a
cupsctl RIPCache=auto

I have checked and

cupsctl RIPCache=auto

solves the problem for me. I have prepared a new CUPS package which sets RIPCache=auto by default. I will upload this package after the release of the beta, so in Maverick this problem will not occur any more.

RIPCache=auto is now set by default in our CUPS package, please remove all RIPCache lines from /etc/init.d/cupsd.conf and if you had to revoe a line, restart CUPS with "sudo /etc/init.d/cups restart". So this bug should not occur in Maverick.

Note that I am not closing this bug as there is still a problem in Ghostscript causing a segfault if a fixed buffer size is set. See the referenced upstream bug.

hendrikwout (hendrikwout) wrote :

I'm trying to print with an canon IP3000 on maverick (upgraded at the time of writing this note) and I'm having the same problem.

After I give the command 'cupsctl RIPCache=auto', the problem doesn't disappear.

hendrikwout (hendrikwout) wrote :

additional note: the canon IP3000 used to work great on ubuntu lucid

hendrikwout, your bug is probably not the same as this one then. Please report a new one (for the package "ghostscript"). There, please attach the file(s) you tried to print and also an error_log as described in "CUPS error_log" on https://wiki.ubuntu.com/DebuggingPrintingProblems.

Bug 618798 seems to be the same as this one and it has an Apport stack trace.

unadulterated (to-sandip) wrote :

I am also facing this problem on ubuntu 10.10 (10.04 was working grt) ... pdf printing to hp laserjet printer.

unadulterated, can you also proceed as described in comment #20 above?

unadulterated (to-sandip) wrote :

attaching the error_log for cups

unadulterated (to-sandip) wrote :

its effecting me a lot, please do something about it.

unadulterated, can you please create a new bug report, attach your error_log there again and also atytach there the PDF file which you have tried to print? Can you also tell which application you have used and which printer model, driver, and option settings? Thanks.

unadulterated (to-sandip) wrote :

I have filed bug before only when something went wrong and ubuntu prompted me with a send report dialog box. I dont know with the information I have how to actually file a bug properly. I did a troubleshooting on the printing that was failing, am attaching it here. I will also attach the pdf file. If possible can you please file a bug for me.

unadulterated (to-sandip) wrote :

Page no. 175 of this pdf file is not printing and giving me those error messages. pdftoraster failed.

Hunter Laux (jolting) wrote :

pdftoraster is used only when using the cups raster API. This only effects printers that don't understand postscript. Not all printers use this. Cups uses poppler to convert from pdf to ps. The problem is pdftoraster uses ghostscript. Ghostscript has problems with TONS of pdf files. That is why cups switched and is now using poppler. The pdftoraster is part of ghostscript.

The solution is simple. Convert from pdf to ps with poppler and then convert from ps to raster with ghostscript.

Mario Marín (mmfmarin) wrote :

Till, I am having the same problem with every pdf I try to print; the printer prints the first page, then it loads the second sheet of paper and the power indicator blinks forever. When I look at the status via cups' web interface, the famous error: /usr/lib/cups/filter/pdftoraster failed, shows up. The printer is a hp deskjet d2660.

The workaround "cupsctl RIPCache=auto" didn't work. Should I file another bug?

Mario Marin, unadulterated, please report separate bugs, and attach what you have already attached here. Also attach your /var/log/syslog and follow the instructions in the sections "CUPS error_log" and "Capturing print job data" in https://wiki.ubuntu.com/DebuggingPrintingProblems. Thanks.

Changed in gs-gpl:
importance: Unknown → High
pcm_man (pcm-man) wrote :

I have the very same problem but it is only when trying to print a "PDF.qwd" file from the default Ubuntu 2.32.0 Document Viewer (Evince). For reasons I don't understand this document which has a *.PDF file name comes up in the viewer as a *PDF.qxd in the viewer. I found that if I open the same document with the PDF viewer epdfview 0.1.7 that it prints this document just fine.

So since you can not print a PDF document directly from the Gnome Desktop I would suggest that we have an interface problem between the application submitting the print job and the CUPS print queue. I would also suggest that perhaps this has to do with some type of memory allocation since it does seem to be dependant on the viewer which initiates the print request.

I certainly wish this serious bug could be fixed as this effects anyone on my network which is trying to print this type of a PDF document. Anyway this was an easy way for me to get around the issue of not being able to print with the default document viewer in Ubuntu. No other changes were made. I really LOVE my 10.10 version of Ubuntu and I DO NOT intend to upgrade to another release any time soon!

unadulterated, your file prints with current Oneiric.

The bug originally reported here is worked around for some time already by CUPS using RIPCache=auto by default. In version 9.04 (upstream release August 5, 2011, included in Oneiric) Ghostscript will ignore the RIPCache setting of CUPS and always use the automatic setting. This is because any fixed-value setting leads to a segfault of CUPS with certain input files.

If you still get Ghostscript crashes, they are caused by other bugs. Please report new bugs then.

Changed in gs-gpl:
status: Confirmed → Fix Released
Changed in ghostscript (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 9.04~dfsg-0ubuntu1

---------------
ghostscript (9.04~dfsg-0ubuntu1) oneiric; urgency=low

  * New upstream release
     - Final 9.04 release, August, 5 2011
     - Flexibility for controlling color based upon the graphic object type.
       Unique output ICC profiles and rendering intents for vector graphic,
       image and text portions of a document can be set. It is also possible
       to override source color specifications and use specified ICC
       profiles and rendering intents for RGB and CMYK vector graphics,
       images and text portions of a document. Finally, DeviceGray source
       colors can now easily be specified to map either to K only or
       composite CMYK when the output device supports CMYK colorants.
     - New tiffscaled8 and tiffscaled24 devices.
     - PDF interpreter now tries to continue interpreting after an error in
       the input stream.
     - Re-enabled x11alpha as the default device on Unix systems, the problems
       with transparency are solved.
     - Experimental text extraction device "txtwrite" with full Unicode support.
     - Print rendering speed improvements for PDF input files (Upstream
       bug #691755, LP: #568363, LP: #668800).
     - Several fixes on the CUPS Raster output device to improve stability
       (Upstream bug #691586, #692368, #692393, LP: #628030).
     - Fixes on the RGBW color space support (needed for HP printers used with
       HPLIP) of the CUPS Raster output device, to work with PDF input files
       with transparency and to reproduce the colors correctly (Upstream bug
       #691922).
     - Added "-dNOINTERPOLATE" to the command lines of the CUPS filters to
       get a significant rendering speed improvement.
     - Fix of the pstopxl CUPS filter to make grayscale printing on color
       printers working.
     - The pxlmono/pxlcolor drivers produced huge output files in Ghostscript
       9.0x (Upstream bug 692329).
  * debian/rules: Updated MD5 sum for original source tarball
  * debian/watch: Search for .tar.bz2 source tarballs
  * debian/symbols.common: Updated for new upstream source. Applied patch
    which dpkg-gensymbols generated for debian/libgs9.symbols to this file.
 -- Till Kamppeter <email address hidden> Fri, 05 Aug 2011 18:43:31 +0200

Changed in ghostscript (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
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.