Cannot print documents to Laserjet 4350, via network

Bug #377011 reported by David Hugh-Jones
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cups (Ubuntu)
Triaged
Medium
Unassigned
ghostscript (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: cups

Since today my printer, a Laserjet 4350 connected via http, stopped working. If I try and print a document from evince (1) the evince print progress bar is extremely slow and (2) I get a variety of failures, in particular error log messages like "unable to write to temporary file: No space left on device". (None of my mounted partitions are full; my main partition has about 600M of disk space.)

Related branches

Revision history for this message
Bryan Basil (bryanlbasil) wrote :

What version of Ubuntu are you using? What were the steps you'd taken before the printer lost functionality?

Revision history for this message
David Hugh-Jones (davidhughjones) wrote : Re: [Bug 377011] Re: Cannot print documents to Laserjet 4350, via network

I can't think of anything I did, except install acrobat reader and use
it to print a file yesterday. My Ubuntu: Jaunty. cups version
1.3.9-17ubuntu3. I would have added this data using apport-collect,
but that times out when trying to connect to launchpad, perhaps
because I am behind a proxy.

Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

It turns out that some documents create huge files in /var/spool/cups/tmp. E.g. 1G and above, over a period of about 1/2 an hour. Eventually, I run out of disk space. Attaching my /var/log/cups/error_log with debugging turned on. Job 339 is the ugly one.

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

The error_log says

E [18/May/2009:19:13:45 +0200] [Job 339] unable to write to temporary file: No space left on device

So the problem is really a too big temporary file. Can you try replacing your /usr/lib/cups/filter/pdftops file by the attached one (and make sure that the permissions get conserved, "chmod 755 /usr/lib/cups/filter/pdftops". This uses another method for turning PDF into Postscript which is more economic with the output file size. If this does not help or causes other problems, restore to the old state with

sudo apt-get install --reinstall cups

Please tell whether this helps.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

This does indeed work. Printing is still slow, but 5 minutes instead
of 35 minutes. The temporary file in /var/spool/cups/tmp now hits a
maximum size of about 20M, whereas before it was going above a
gigabyte. Thank you!

Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

NB though that the current version does not respect the "two-sided"
options set in the evince print dialog - it prints one sided, if I
request two-sided long-edge binding.

Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

Also, when printing the attached document, after printing 1-2 pages
the printer stops and prints out a page which says
"ERROR:
typecheck
OFFENDING COMMAND:
known"

There's no visible error in the cups error_log, though I can attach it
if you wish. After reinstalling cups via apt-get, the document prints
normally and two-sided printing settings are respected.

Changed in cups (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in ghostscript (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The problem why the alternate pdftops does not work is that it produces non-DSC-conforming PostScript but advertizes it as DSC-conforming. This leads the CUPS pstops filter to fail, the filter which handles the double-sided attribute and which also crashed on the long document.

I have fixed this in Ghostscript upstream (SVN rev 9748) and also made a workaround in the alternative pdftops filter for the time being. The new version of the filter is attached. Please test.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ghostscript - 8.64.dfsg.1-0ubuntu11

---------------
ghostscript (8.64.dfsg.1-0ubuntu11) karmic; urgency=low

  * debian/patches/53_fix-pstoraster-for-call-with-input-filename.dpatch:
    pstoraster did not work when called with an input file name as the 6th
    command line argument.

  * debian/patches/50_ps2write-do-not-advertize-dsc-conformance.dpatch:
    The "ps2write" output device produces PostScript which is not
    DSC-conforming, so do not advertize it as DSC-conforming with a
    "%!PS-Adobe-..." magic string. Use "%!" instead. Otherwise the "pstops"
    CUPS filter cannot handle this output (LP: #377011).

  * debian/patches/45_cups-device-pagesize-margins-duplex-fixes.dpatch:
    Fixed recognition of page size via /cupsPageSizeName. All page sizes were
    considered custom sizes if /cupsPageSizeName was not set.

 -- Till Kamppeter <email address hidden> Thu, 21 May 2009 15:25:49 +0200

Changed in ghostscript (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

The new pdftops fixes the printing on one side problem. But the other
problem is still there: printing beyond page 8 of the earlier
attachment stops with the ERROR:typecheck message.

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

Please try also this file as alternative pdftops filter, it contains additional workarounds:

http://launchpadlibrarian.net/27277232/pdftops

Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

Tried the new filter. Problem persists, I'm afraid.

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

I have attached a Poppler-based pdftops filter now. Can everyone who has still problems try it?

Note that currently bug 310575 still applies with it, but this will soon be solved by a Poppler fix (https://bugs.freedesktop.org/show_bug.cgi?id=19777, bug 382379).

Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

Using this, the earlier attachment now prints ok. The original bug is
partly fixed; huge files still get created in /var/spool/cups, but
they are manageably large (at least the test case I just tried).
Printing is still slow, though.

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

Can you tell how big the temporary files get now?

Revision history for this message
David Hugh-Jones (davidhughjones) wrote :

about 64M in the example I used.

David Hugh-Jones
Post-doctoral Researcher
Max Planck Institute of Economics, Jena
http://davidhughjones.googlepages.com

2009/6/3 Till Kamppeter <email address hidden>:
> Can you tell how big the temporary files get now?
>
> --
> Cannot print documents to Laserjet 4350, via network
> https://bugs.launchpad.net/bugs/377011
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “cups” source package in Ubuntu: Triaged
> Status in “ghostscript” source package in Ubuntu: Fix Released
>
> Bug description:
> Binary package hint: cups
>
> Since today my printer, a Laserjet 4350 connected via http, stopped working. If I try and print a document from evince (1) the evince print progress bar is extremely slow and (2) I get a variety of failures, in particular error log messages like "unable to write to temporary file: No space left on device". (None of my mounted partitions are full; my main partition has about 600M of disk space.)
>

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

64 MB is still big, but much better that I GB ...

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

With the attached Poppler-based pdftops filter some fonts get lost (bug 362186, bug 381788), please use the new version attached here.

Revision history for this message
adonet (jeroen-adolfse) wrote :

With this version of pdftops I could print a 2 page document from Open Office without any problem on my network Laserjet4000 printer. I have to use the Laserjet4000 CUPS + Gutenprint driver instead of the recommended printerdriver. Its not al beautiful as the recommendend driver (600 dpi instead of 1200 dpi), but I can print again.

I 'll test it with other applications and post the result here.

Thanks Till for your assistance!

Jeroen

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

adonet, does the PostScript PPD (should be the recommended choice) not work? If it does not work with the newest filter, please tell what comes out of the printer and also provide an error_log. Thanks.

Revision history for this message
adonet (jeroen-adolfse) wrote :

The Postscript PPD doesn't print. The printer tells me on its screen that's receiving data, but nothing happens. Sometimes the computer tells me that the print job 's been finished. Some times it asks me if the printer is not connected.

This is my /var/log/cups/error_log when printed with the postscript printerdriver. After this the printer isn't capable of printing anymore until I turn it of, and on again and cancelled all jobs on the printer.

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

adonet, please follow the instructions in the "CUPS error_log" section of

https://wiki.ubuntu.com/DebuggingPrintingProblems

to create a complete error_log. Thanks.

Revision history for this message
adonet (jeroen-adolfse) wrote :

Till
here is the requested error_log with pdstops from june the 3rd

Jeroen

Revision history for this message
adonet (jeroen-adolfse) wrote :

Till and here is the error_log with the pdftops file from june 10th.

This one made the printer stop within half a minute. The one of june the 3rd didn't stop within several minutes (9 to be precisely, than I ran out of patience). In both cases I used the reccomended postscript ppd for my laserjet 4000 and nothing came out of the printer.

Jeroen

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

For all jobs your error_log shows the following:

D [10/Jun/2009:10:34:31 +0200] [Job 48] /usr/lib/cups/filter/cpdftocps: 83: /usr/lib/cups/filter/pdftops: Permission denied

You did not make the the new filter executable. Run the commands

cancel -a
sudo chmod 755 /usr/lib/cups/filter/pdftops

Then try to print again. Now it should work.

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

The error_log of the 3rd of June is not really of the 3rd of June, it is also from the 3rd of June, taken even after the one posted here as of the 10th of June. It contains one job more, with pdftops successfully running, but the pdftops used is the old one using GhostScript with "pswrite". One can see it from this line:

D [10/Jun/2009:10:58:08 +0200] [Job 52] %%Creator: GPL Ghostscript 864 (pswrite)

Please replace your /usr/lib/cups/filter/pdftops file by the file attached to this comment and make the new file executable:

cancel -a
sudo chmod 755 /usr/lib/cups/filter/pdftops

Then try to print again.

This newest version contains also a fix in handling non-integer paper size definitions.

Revision history for this message
adonet (jeroen-adolfse) wrote :

Till,

thank you very much for your help. It works. I printed this website and within one minute it came out of my laserjet.
Once again, thank you very much. I'll try this now in Linux Mint 7 as well. Since it's based on Jaunty , it might work for that distro as well.

I'll let you know

cheers Jeroen

Revision history for this message
adonet (jeroen-adolfse) wrote :

Linux Mint 7 (Gloria) based on Ubuntu Jaunty Jackalope seems not to print with this solution. Th printer might not be connected.
The printer settings page tells me that the document does not conform to the Adobe Document Structuring Convention and may not print correctly.

This is the error log file from mint 7

Revision history for this message
adonet (jeroen-adolfse) wrote :

After another try, this is the error_log again.

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

In both cases (Job 8 and Job 9) you do not have the correct filter installed. The one you are using is an old Ghostscript filter on which I stll got a lot of complaints. On can see that the old Ghostscript-based filter is used by these lines in the error_log:

D [10/Jun/2009:19:46:54 +0200] [Job 8] Device copies: 1; device collate:
D [10/Jun/2009:19:46:54 +0200] [Job 8] pdftops argv[5] = 8 mint7 DebuggingPrintingProblems - Ubuntu Wiki 1 Resolution=1200x1200dpi Smoothing=Dark MediaType=None PageSize=A4 noHPEconoMode number-up=1 Duplex=None InputSlot=Auto noManualFeed HPHalftone=Enhanced job-uuid=urn:uuid:ba959bbe-b94a-3134-6cc0-69459eb41eee
D [10/Jun/2009:19:46:54 +0200] [Job 8] PPD: /etc/cups/ppd/HP-LaserJet-4000-postscript.ppd
D [10/Jun/2009:19:46:54 +0200] [Job 8] Resolution: 1200x1200
D [10/Jun/2009:19:46:54 +0200] [Job 8] Page size: A4
D [10/Jun/2009:19:46:54 +0200] [Job 8] Width: 595, height: 842, absolute margins: 13.44, 12.06, 581.76, 829.74
D [10/Jun/2009:19:46:54 +0200] [Job 8] Relative margins: 13.44, 12.06, 13.24, 12.26
D [10/Jun/2009:19:46:54 +0200] [Job 8] PPD options: -r1200 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842
D [10/Jun/2009:19:46:54 +0200] [Job 8] PostScript to be injected:
D [10/Jun/2009:19:46:54 +0200] [Job 8] Running /usr/bin/gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=ps2write -sOUTPUTFILE=%stdout -dLanguageLevel=2 -r1200 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 /var/spool/cups/tmp/pstopxl.ZyxZtQ
D [10/Jun/2009:19:46:54 +0200] [Job 8] Page = 595x842; 13,12 to 582,830
D [10/Jun/2009:19:46:54 +0200] [Job 8] slow_collate=0, slow_duplex=0, slow_order=0
W [10/Jun/2009:19:46:54 +0200] [Job 8] This document does not conform to the Adobe Document Structuring Conventions and may not print correctly!

Please download and install my latest attachment of a pdftops filter

https://bugs.edge.launchpad.net/ubuntu/+source/cups/+bug/377011/comments/27
http://launchpadlibrarian.net/27725408/pdftops

also on your Mint 7 system. Then try to print again.

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

Sorry, I attached the wrong file. Please use the one attached to this comment.

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.