Can't print from evince

Bug #578380 reported by FernanAguero on 2010-05-10
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
poppler (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: evince

I've recently upgraded my Ubuntu system to Lucid Lynx and now I can't print from evince.

Symptoms: even simple files (see attached PDF) won't print. The same files (or even more complex PDF files containing embedded fonts and graphics as produced by LaTeX) can be printed without issues on the same box using acroread. So everything says to me that CUPS (or whatever printing subsystem is being used) works fine.

Printer is a Lexmark T644 available on the network.

When in evince, the print dialog opens, and I can send the files to the printer apparently without problems. The print queue shows a printing job being sent to the printer, and the printer itsef starts heating the drums, rolling the brushes, etc but then nothing comes out.

Maybe the spooled file produced by evince crashes the printer's PCL/PostScript interpreter?

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: evince 2.30.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Mon May 10 11:10:17 2010
EcryptfsInUse: Yes
KernLog:

ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: evince
---
Architecture: i386
CupsErrorLog:

DistroRelease: Ubuntu 10.04
EcryptfsInUse: Yes
Lpstat: device for lexmark: socket://192.168.10.79:9100
MachineType: Sun Microsystems Sun Ultra 20 Workstation
NonfreeKernelModules: nvidia
Package: cups 1.4.3-1
PackageArchitecture: i386
Papersize: letter
PpdFiles: lexmark: Lexmark T644 Foomatic/Postscript (recommended)
ProcCmdLine: root=/dev/md0 ro quiet splash
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Tags: lucid
Uname: Linux 2.6.32-22-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 03/20/2006
dmi.bios.vendor: Sun Microsystems
dmi.bios.version: 2.2.1
dmi.board.name: 2864
dmi.board.vendor: Sun Microsystems
dmi.board.version: Rev 50
dmi.chassis.asset.tag: 0123456
dmi.chassis.type: 3
dmi.chassis.vendor: Sun Microsystems
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnSunMicrosystems:bvr2.2.1:bd03/20/2006:svnSunMicrosystems:pnSunUltra20Workstation:pvrRev50:rvnSunMicrosystems:rn2864:rvrRev50:cvnSunMicrosystems:ct3:cvrN/A:
dmi.product.name: Sun Ultra 20 Workstation
dmi.product.version: Rev 50
dmi.sys.vendor: Sun Microsystems

FernanAguero (fernan-ciudad) wrote :
madbiologist (me-again) wrote :

 I can print this file on a Canon i965 (non Postscript) printer attached locally via USB. Therefore I think that your guess "Maybe the spooled file produced by evince crashes the printer's PCL/PostScript interpreter?" is probably correct. Unfortunately I don't have the expertise to troubleshoot this further. We will have to wait for someone else (perhaps Till Kampenter) to look at this bug.

Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately we can't fix it without more information. Please include the information requested at https://wiki.ubuntu.com/DebuggingPrintingProblems as separate attachments.

Changed in evince (Ubuntu):
importance: Undecided → Low
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

I guess I've filled in the necessary details ... let me know if you need more information or want me to test further.

Still can't print from evince.

madbiologist (me-again) on 2010-05-27
Changed in evince (Ubuntu):
status: Incomplete → New
FernanAguero (fernan-ciudad) wrote :

My box is now at 10.10 (Maverick) and the issue is still there (Lexmark T644).

The issue affects printing from many apps. Can't print directly from OpenOffice, can't print from evince, can't print from gimp. The only way I've found to get printouts from this box is printing first to a file (.pdf) and then sending the printjob to the printer from Adobe Acrobat.

At home, using an HP Photosmart printer I don't see this issue, either in Lucid or in Maverick. Don't know if this is of any help, but probably is, as this is giving a hint about what the problem might be: what page rendering language is being sent to the printer? Postscript? PCL? Who is responsible for generating this output? gs? cups?

Maybe there's a bug already reported for one of these subsystems? I can help trying to debug with some guidance.

But it's really a shame that a commercial product (Acrobat) is able to send correct Postscript/PCL, or whatever it is, to the printer, and that this bug is still new, unassigned, and marked as low priority after 6 months.

It's not only me that's having this problem ... other users have already reported similar issues:
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/373796

FernanAguero, can you follow the instructions in the sections "CUPS error_log" and "Capturing print job data" on https://wiki.ubuntu.com/DebuggingPrintingProblems. Thanks.

Changed in evince (Ubuntu):
status: New → Incomplete
FernanAguero (fernan-ciudad) wrote :

Thanks Till for the prompt response, and for the suggestions,

Using the same test.pdf file posted before (https://bugs.launchpad.net/ubuntu/+source/evince/+bug/578380/+attachment/1385033/+files/test.pdf) I have captured two spooled print jobs, one from evince (681) and one from adobe acrobat (682):

[fernan@sigma] lpstat -o
lexmark-681 fernan 10240 Fri 19 Nov 2010 11:03:32 AM ART
lexmark-682 fernan 180224 Fri 19 Nov 2010 11:05:13 AM ART
[fernan@sigma] sudo ls -l /var/spool/cups/
total 204
-rw------- 1 root lp 822 2010-11-19 11:04 c00681
-rw------- 1 root lp 794 2010-11-19 11:05 c00682
-rw-r----- 1 root lp 9433 2010-11-19 11:03 d00681-001
-rw-r----- 1 root lp 179576 2010-11-19 11:05 d00682-001

I am attaching here one print job (681, spooled from evince) and will follow up this post with other attachments (spooled print job from acrobat, and cups error_log).

FernanAguero (fernan-ciudad) wrote :

This print job (682) prints OK on the Lexmark T644.

The previous attachment (681) failed to print. As I described before, the job gets sent to the printer, the printer wakes up, heats the drums, starts rolling the brushes, etc. but then nothing comes out.

FernanAguero (fernan-ciudad) wrote :

CUPS error log (/var/log/cups/error_log)

Job 681 sent ~ 11:03
Job 682 sent ~ 11:05

FernanAguero (fernan-ciudad) wrote :

Till,

have you been able to look into the spooled output generated by both evince and acroread?

Any idea what the problem might be?

I did not see anything wrong with the files, but everything looks like that libcairo (used by evince) produces bad PDF. Probably the same as bug 680628.

This is not the same as bug 680628. Bug 680628 involves a very large number of masked images. This bug is an very simple test case containing some text. Comment 17 indicates that printing from any application including OpenOffice fails. OpenOffice does not use cairo for printing which suggests the problem lies somewhere else.

FernanAguero, I recommend trying the steps https://bugs.launchpad.net/ubuntu/+source/cups/+bug/419143/comments/95 to work out if cairo is causing your evince printing problems.

FernanAguero (fernan-ciudad) wrote :

Thanks Adrian for the suggestions.

I've followed the steps you recommended on
https://bugs.launchpad.net/ubuntu/+source/cups/+bug/419143/comments/95
but I'm posting the results here as it seems like

i) bug 419143 is specific for the "spurious '0a' in cairo generated PDF" and I'm not experiencing that particular issue; and

ii) you mention that maybe this bug report is not a duplicate of 680628 ...

Anyway, using the same simple 'test.pdf' file that I attached to this bug report previously, this is what I've found:

> a) Check that using poppler to generate the PostScript then sending the PS
> file directly to the printer bypassing any cups filters works:
> pdftops file.pdf
> lpr -o raw file.ps

The 'test.ps' file produced using pdftops fails to print (as explained before, the job is sent to the printer, the printer processes the job, but nothing comes out of the printer)

(attached: test-pdftops.ps)

> b) Then use cairo to convert the PDF to PS. This can be done by opening
> the file in evince and printing to a PS file.
> Print with "lpr -o raw".
> If this fails but (a) works it is a cairo bug.

This works. (attached: test-evince-printtops.ps)

Printing to a .ps file from OpenOffice and then sending the .ps file to the printer using lpr(1) also works.
(attached: test2.odt, test2-openoffice-printtops.ps)

And printing to a .ps file from acrobat also works (but this was expected,
because printing from acrobat worked in any case).

As reported previously, printing from Gimp directly also failed. But printing from Gimp to a ps file and then sending the postscript file to the printer using lpr(1) also works.
(attached: gimptest.gif, gimptest-gimp-printtops.ps)

Seems like it's not a cairo problem but a poppler problem then?

Thanks for the guidance!

--
fernan

FernanAguero (fernan-ciudad) wrote :
FernanAguero (fernan-ciudad) wrote :

This one prints OK:
lpr -o raw gimptest-gimp-printtops.ps

FernanAguero (fernan-ciudad) wrote :

Also, but I'm not sure if it's of any help, I can open all postscript files with gs(1) or gv(1), even the one generated by pdftops(1) that fails to print. So apparently, whatever is causing the printer to choke is not affecting ghostscript.

> Seems like it's not a cairo problem but a poppler problem then?

Yes, definitely a problem with the pdftops utility in poppler.

Launchpad Janitor (janitor) wrote :

[Expired for evince (Ubuntu) because there has been no activity for 60 days.]

Changed in evince (Ubuntu):
status: Incomplete → Expired
madbiologist (me-again) wrote :

Changing status back to New since requested information was provided.

Changed in evince (Ubuntu):
status: Expired → Incomplete
status: Incomplete → New
papukaija (papukaija) wrote :

This bug report is being marked as confirmed because it is affecting more than one person. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status . Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

tags: added: maverick regression-release
summary: - [regression] can't print from evince
+ Can't print from evince
Changed in evince (Ubuntu):
status: New → Confirmed
madbiologist (me-again) wrote :

According to comments #25 and #32 this bug lies in poppler. Changing affected package to poppler.

Fernan - does this still occur in Ubuntu 11.04 "Natty Narwhal" beta?

affects: evince (Ubuntu) → poppler (Ubuntu)
FernanAguero (fernan-ciudad) wrote :

Hi, and sorry for the delay. Just upgraded to natty and I can now confirm that the problem is still here.

madbiologist (me-again) on 2011-06-10
tags: added: natty
Vesa Suontama (vesa-suontama) wrote :

Workaruound:

Using natty 11.04. Can not print the pdf from evince, but printing to a .ps file and then issuing lpr <file.ps> and the file prints out.

Something I didn't think to ask before is to check that your printer has PS error message printing enabled.

Looking at the Lexmark T644 menus and messages manual at:
http://www.lexmark.com/publications/pdfs/t640/eng/menumess.pdf
there is a setting under the PostScript menu for enabling the printing of PostScript errors. It defaults to off which silently discards the print job instead of printing a page containing the error message.

FernanAguero (fernan-ciudad) wrote :

Adrian, Vesa,

I was trying to enable postcript errors in the printer as suggested, but the problem seems to have disappeared now. Probably in some of the recent updates?

I'm running an up-to-date Natty (11.04) as of August 4th, 2011 (all updates installed).

Can you please check and report back to confirm that this bug can be closed now?

Hugo Venhorst (yougo) wrote :

Same probem on 13.04 since a week or 2. My printer is a Samsung ml 1640, bit behavior is the same. It heats the drum and everything, but no paper comes out.

Other programs print fine
Other PDF viewers/editors print fine

Is there any command output or log that I can attach here?

To post a comment you must log in.