Specific PDF file fails to print to HP m551dn printer

Bug #1813432 reported by Jonathan Kamens
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
New
Undecided
Unassigned

Bug Description

One particular PDF file is failing to print. I have no idea why. When I say failing to print I mean that my computer thinks the file printed but the printer shows no sign of ever having received it. The display of the printer never changes to show that it is receiving or printing a file, and the job log of the printer doesn't show that it was received either. I also checked the printer event log and it doesn't show any events at the time I attempted to print the file.

Unfortunately I can't attach the PDF file itself because it contains private information, and I can't find another PDF that exhibits this problem. I even tried generating a new PDF exactly the same way the old one was generated -- with the scan to email PDF function on my scanner -- and the new PDF prints just fine.

I tried uploading the PDF directly to the printer with FTP and it prints just fine that way.

I enabled CUPS debug mode before attempting to print the file. Attached is the resulting contents of /var/log/cups/error_log.

I wish I knew what was going on here but honestly I have no idea. Perhaps you can learn something from the error_log. I hope so.

Other files, including other PDFs, do print.

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: cups 2.2.10-3
ProcVersionSignature: Ubuntu 4.18.0-13.14-generic 4.18.17
Uname: Linux 4.18.0-13-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.10-0ubuntu19
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Jan 26 17:47:49 2019
InstallationDate: Installed on 2019-01-02 (24 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
Lpstat:
 device for duplex: socket://m551dn.kamens.brookline.ma.us:9100
 device for HP_LaserJet_500_color_M551_1637DA_: ipps://m551dn.local:443/ipp/print
 device for simplex: socket://m551dn.kamens.brookline.ma.us:9100
MachineType: Acer Predator G6-710
Papersize: letter
PpdFiles:
 Error: command ['fgrep', '-H', '*NickName', '/etc/cups/ppd/simplex.ppd', '/etc/cups/ppd/HP_LaserJet_500_color_M551_1637DA_.ppd', '/etc/cups/ppd/duplex.ppd'] failed with exit code 2: grep: /etc/cups/ppd/simplex.ppd: Permission denied
 grep: /etc/cups/ppd/HP_LaserJet_500_color_M551_1637DA_.ppd: Permission denied
 grep: /etc/cups/ppd/duplex.ppd: Permission denied
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.18.0-13-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=1
SourcePackage: cups
UpgradeStatus: Upgraded to disco on 2019-01-21 (5 days ago)
dmi.bios.date: 05/18/2016
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: R01-A4
dmi.board.name: Predator G6-710
dmi.board.vendor: Acer
dmi.chassis.type: 3
dmi.chassis.vendor: Acer
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrR01-A4:bd05/18/2016:svnAcer:pnPredatorG6-710:pvr:rvnAcer:rnPredatorG6-710:rvr:cvnAcer:ct3:cvr:
dmi.product.family: Acer Desktop
dmi.product.name: Predator G6-710
dmi.sys.vendor: Acer

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

Please run the following command:

lpadmin -p duplex -o pdftops-renderer-default=gs

Then print the job again on your print queue "duplex".

Does the job get correctly printed now?

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Jonathan Kamens (jik) wrote :

No change.

How do I undo what I just did, i.e., how do I undo the option setting you just had me add to perform this test?

Changed in cups (Ubuntu):
status: Incomplete → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

How did you print this file? Did you use evince? "lp -d <printer> <file>"? Or some other application? Can you try to print with another of the possible methods/applications? Does the file print then?

Changed in cups (Ubuntu):
status: New → Incomplete
Revision history for this message
Jonathan Kamens (jik) wrote :

I take it back, there _is_ a difference.

When I use `lp -d duplex -o pdftops-renderer=gs` to print the file, it does in fact print. I didn't initially notice because the printer was telling me to insert a weird paper size and I had to override it and tell it to use the default paper even though the job size being sent by cups was slightly off of 8.5x11.

Revision history for this message
Jonathan Kamens (jik) wrote :

What is the default pdftops-renderer for CUPS in Ubuntu? I can't find it documented anywhere and I can't figure out how to query CUPS to ask what it is.

Revision history for this message
Jonathan Kamens (jik) wrote :

So, if I use pdftops-renderer=pdftops or pdftops-renderer=pdftocairo nothing happens on the printer at all. If I use pdftops-renderer=gs the printer prints the job with a non-standard paper size. If I use pdftops-renderer=mupdf it fails, even if I have mupdf or mupdf-tools installed, because apparently mupdftoraster isn't in the mupdf package (and I'm not sure what package it's in).

Revision history for this message
Jonathan Kamens (jik) wrote :

>How do I undo what I just did, i.e., how do I undo the option setting you just had me add to perform this test?

nvm this question I figured it out.

Revision history for this message
Jonathan Kamens (jik) wrote :

It doesn't print with lpr. It doesn't print with lp -d. It doesn't print from evince. It doesn't print from the chrome PDF viewer.

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

To remove the setting:

lpadmin -p duplex -R pdftops-renderer-default

See /usr/share/doc/cups-filters/README.gz section "POSTSCRIPT PRINTING RENDERER AND RESOLUTION SELECTION" for more information.

The standard selection is "hybrid", meaning that Ghostscript is used in most cases and Poppler (/usr/bin/pdftops) for printers which are known to be not compatible with Ghostscript's output. According to your error_log in your case Poppler got selected. I want to find out now whether this decision is perhaps not good for your printer so that I can modify it.

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

Please try to print with

lp -d duplex -o fit-to-page -o pdftops-renderer=XXX

with XXX bring "hybrid", "gs", "pdftops", "pdftocairo", ...

Does this work?

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

mupdftoraster is part of cups-filters. If it is missing for you, run

sudo apt install --reinstall cups-filters

Revision history for this message
Jonathan Kamens (jik) wrote :

I tried `lp -d duplex -o fit-to-page -o pdftops-renderer=XXX` with hybrid, gs, pdftops, pdftocairo, and mupdf as the renderers (for the last I had to install both mupdf and mupdf-tools).

The only one that made it through to the printer was gs.

All claimed to print, but gs was the only one that actually did.

Please note my comments at the end of https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/428817. I using a PPD for my printer downloaded directly from HP because for some inexplicable reason it is not installed with Ubuntu (or, at least, it was not installed with Ubuntu 18.10, when I configured the printer). This may be relevant.

For me, the sticking point remains, why does this one PDF file cause problems when no others (that I've seen) do?

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

In comment #13 you told that it prints with Ghostscript via

lp -d duplex -o fit-to-page -o pdftops-renderer=gs

Did it again send the job with a weird paper size? Or did the job come out straight away?

The "-o fit-to-page" should scale each page into the standard page size.

Does

lp -d duplex -o PageSize=Letter -o pdftops-renderer=gs

print straight away or does the printer ask for the weird paper size?

Revision history for this message
Jonathan Kamens (jik) wrote :

>In comment #13 you told that it prints with Ghostscript via
>
>lp -d duplex -o fit-to-page -o pdftops-renderer=gs
>
>Did it again send the job with a weird paper size? Or did the job come out straight away?

Came out straight-away. But this is not actually the behavior that I want, because there's a black bar across the very bottom of the page generated by the scanner that generated the document, and I _want_ that bar to be hidden in the unprintable margin of the page; I don't want the whole PDF image to be shrunk to fit within the page margins.

>Does
>
>lp -d duplex -o PageSize=Letter -o pdftops-renderer=gs
>
>print straight away or does the printer ask for the weird paper size?

Printer asks for weird paper size.

Changed in cups (Ubuntu):
status: Incomplete → New
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have added this case to upstream discussion now:

https://github.com/OpenPrinting/cups-filters/issues/65

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.