Xerox WorkCentre 7245 (7228) prints only first page

Bug #513690 reported by Arne Christensen
28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
foomatic-filters (Ubuntu)
Fix Released
Medium
Unassigned
Karmic
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: system-config-printer-gnome

root@kapowdk-ac:/usr/bin# lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
root@kapowdk-ac:/usr/bin# apt-cache policy system-config-printer-gnome
system-config-printer-gnome:
  Installed: 1.1.12+git20090826-0ubuntu8
  Candidate: 1.1.12+git20090826-0ubuntu8
  Version table:
 *** 1.1.12+git20090826-0ubuntu8 0
        500 http://dk.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

I added a Xerox WorkCentre 7245 printer using system-config-printer. A little research revealed that you need to select the 7228 from the list in that case, which is a sister product (e.g. the printed Xerox manual has both numbers on the front page).

The printer sort of worked, but it would print only the first page of everything, where I would expect it to print all pages. This was the case no matter which program I printed from (Firefox, OpenOffice, ...)

As the Xerox is a PostScript printer, I installed another (HP) PostScript printer for comparison. It worked as expected. As installed, the /etc/cups/printers.conf has for the Xerox printer:

Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-postscript 100 foomatic-rip
Filter application/vnd.cups-pdf 0 foomatic-rip
Filter application/vnd.apple-pdf 25 foomatic-rip

while the HP printer has:

Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-command 0 commandtops
Filter application/vnd.cups-postscript 0 -

(Special thanks to etckeeper for keeping record of these details!)

As a test, I printed to a PostScript file, then sent it to the printer with "lpr -oraw file.ps". That worked.

So now I have modified /etc/cups/printers.conf, using the HP printer's Filter lines also for the Xerox printer. This solves my problem, however the bug should be fixed for the benefit of the next guy with a Xerox WorkCentre 7228/7245.

ProblemType: Bug
Architecture: amd64
CupsErrorLog:

Date: Thu Jan 28 08:47:43 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Lpstat:
 device for HP-LaserJet-P2015-Series: dnssd://HP%20LaserJet%20P2015%20Series%20(255D20)._pdl-datastream._tcp.local/
 device for Xerox-WorkCentre-7245: socket://xerox7245.kapow.dk:9100
MachineType: Dell Inc. Precision WorkStation T3400
NonfreeKernelModules: nvidia
Package: system-config-printer-gnome 1.1.12+git20090826-0ubuntu8
PackageArchitecture: all
Papersize: a4
PpdFiles:
 Xerox-WorkCentre-7245: Xerox WorkCentre 7228 Foomatic/Postscript
 HP-LaserJet-P2015-Series: HP LaserJet P2015 Series Postscript (recommended)
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.31-17-generic root=UUID=2df9c5b6-9dde-4650-8b67-32c69fb5e6ba ro quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_DK.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic
SourcePackage: system-config-printer
Uname: Linux 2.6.31-17-generic x86_64
dmi.bios.date: 03/21/2008
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A04
dmi.board.name: 0TP412
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 7
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA04:bd03/21/2008:svnDellInc.:pnPrecisionWorkStationT3400:pvr:rvnDellInc.:rn0TP412:rvr:cvnDellInc.:ct7:cvr:
dmi.product.name: Precision WorkStation T3400
dmi.sys.vendor: Dell Inc.

Revision history for this message
Arne Christensen (arne-christensen) wrote :
Revision history for this message
Arne Christensen (arne-christensen) wrote :
Revision history for this message
Arne Christensen (arne-christensen) wrote :
Revision history for this message
Arne Christensen (arne-christensen) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

This problem can be caused by foomatic-rip using a bad method to turn PDF into PostScript. I have done a fix in foomatic-rip to use a better method. See bug 463059. Please test the fix proposed there and tell whether it also solves your problem.

affects: system-config-printer (Ubuntu) → foomatic-filters (Ubuntu)
Changed in foomatic-filters (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please test the Karmic SRU (Stable Release Update) in bug 463059. See comment #25 there.

Revision history for this message
Arne Christensen (arne-christensen) wrote :

Thanks for taking the time to investigate this!
However the fixed foomatic-rip from karmic-proposed makes no difference, I still get only the first page (I DID remember to undo my changes to /etc/cups/printers.conf for this test).

I have made another test, snatching the input and output to/from foomatic-rip by renaming it and replacing it with a small script:

#!/bin/bash
echo "$*" >> /tmp/foo.log
env >> /tmp/foo.log
tee /tmp/foo-in.ps | /usr/bin/foomatic-rip-orig "$@" | tee /tmp/foo-out.ps

See the attached foo.log, foo-in.ps and foo-out.ps
Interestingly, while viewing with "gs foo-in.ps" is very quick and opens a reasonably sized window with the result, doing the same for the foo-out.ps file is a very slow thing and produces very large-size output.

Revision history for this message
Arne Christensen (arne-christensen) wrote :
Revision history for this message
Arne Christensen (arne-christensen) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The foo-out.ps is not broken, once the size is not unreasonable. It is double the size of foo-in.ps and foo-in.ps is not PostScript, it is PDF and PDF is usually smaller than PostScript. Second, the fact that "gs" does not display it is normal, also other PostScript files produced by Poppler have this problem. You can display the file with "gv" or evince though, without any size and speed problems. My HP LaserJet P3005 prints the unfiltered foo-out.ps without problems and without delays.

Can you try to send foo-out.ps to your printer, unfiltered:

nc -w1 <IP address of the printer> 9100 < foo-out.ps

OR

lp -oraw foo-out.ps

Can you also check whether you have a ~/.cups/lpoptions file or an /etc/cups/lpoptions file and if you have such files post them here. Move these files to another directory and try to print again. Does this solve the problem.

Revision history for this message
Arne Christensen (arne-christensen) wrote :

With
   lp -oraw foo-out.ps
I get only the first page of the document. With
   lp -oraw foo-in.ps
I get all 4 pages, which is why I changed printers.conf. I have no lpoptions files:
ac@kapowdk-ac:~$ ls ~/.cups
ls: cannot access /home/ac/.cups: No such file or directory
ac@kapowdk-ac:~$ ls /etc/cups/lpoptions
ls: cannot access /etc/cups/lpoptions: No such file or directory

But see this:
ac@kapowdk-ac:~$ nc -w1 xerox7245.kapow.dk 9100 </tmp/foo-out.ps
%%[ Error: ioerror; OffendingCommand: flushfile ]%%
%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

If I read the PostScript correctly, flushfile is called only from the EndPage (re)definition in line 4120. Might the printer's PostScript implementation be missing something?

Revision history for this message
Arne Christensen (arne-christensen) wrote :

Forgot to say: I get no complaints from doing:
nc -w1 xerox7245.kapow.dk 9100 </tmp/foo-in.ps

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

First, your printer is not only a PostScript printer but also a PDF printer, therefore it prints foo-in.ps unfiltered, which is a PDF file.

Second, if you print unfiltered with "lp -o raw ..." answers of the printer get somewhere buried in the error_log, if you send files to the printer with "nc", you see the answers of the printer in your terminal window.

According to the printer's answer it seems that the Xerox printer does not like the "flushfile" command (in the PostScript code inserted by foomatic-rip for page logging), whereas my HP printer and also gv or evince (both backed by Ghostscript) have no problems with this command. This makes the Xerox printer abort the job on the first "flushfile" command which is exactly when the first page is completed.

Please do the following:

Edit foo-out.ps, preceedinmg the line which contains "flushfile" with a "%" character. This deactivates this line. Send the resulting file to printer unfiltered. Does the file print completely now?

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

I have checked and the page logging code should not get inserted into the PostScript output by foomatic-rip. Seems to be an upstream bug in foomatic-rip.

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

To get your printer to work, please set up your printer with the following PPD file:

http://openprinting.org/foomatic-db/db/source/PPD/Xerox/xrx7242.ppd

Download the PPD and then create a new print queue with system-confiog-printer and instead of choosing manufacturer and model, select supplying a PPD file and use the PPD you have downloaded.

Revision history for this message
Arne Christensen (arne-christensen) wrote :

Answer to comment #13: Commenting out the "flushfile" makes "lp -oraw ..." print all the pages.

Answer to comment #15: Yes, with the 7242 PPD, printing works out of the box, because the following is inserted into /etc/cups/printers.conf for the added printer:

Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-command 0 commandtops
Filter application/vnd.cups-postscript 0 -

That is, the same stuff as for the HP printer I tried, and which I put into printers.conf as a workaround before reporting the problem.

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

Fixed in upstream BZR repository of foomatic-filters.

Changed in foomatic-filters (Ubuntu):
status: Triaged → In Progress
Changed in foomatic-filters (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foomatic-filters - 4.0.3-0ubuntu4

---------------
foomatic-filters (4.0.3-0ubuntu4) lucid; urgency=low

  * debian/patches/20_foomatic-rip-suppress-page-accounting.dpatch:
    Make the insertion of page accounting code into PostScript data streams
    actually suppressed if instructed appropriately by the PPD file
    (especially for Foomatic/Postscript PPDs) (LP: #513690).
 -- Till Kamppeter <email address hidden> Fri, 5 Feb 2010 12:46:17 +0100

Changed in foomatic-filters (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Thank you very much for your bug report and your quick answers. I have uploaded a fixed foomatic-filters package for Lucid now.

Changed in foomatic-filters (Ubuntu Karmic):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Arne Christensen (arne-christensen) wrote :

Good to see this fixed; thanks for the great support. It's what we need to further this platform.

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

I have uploaded a fixed package for Karmic to -proposed now which is waiting for approval. A debdiff is attached.

Changed in foomatic-filters (Ubuntu Karmic):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted foomatic-filters into karmic-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
Revision history for this message
Arne Christensen (arne-christensen) wrote :

Sorry for the delay, I was away from the office. I have updated foomatic-filters from karmic-proposed, installed a new printer (well, pointing the the same physical printer, I'm not Uncle Scrooge!), which works like a charm!
Checked /etc/cups/printers.conf, where the new printer has
    Filter application/vnd.cups-postscript 100 foomatic-rip
My conclusion: Fix verified. I suppose someone else will change the bug status appropriately, if appropriate :-)
Thanks for the support!

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

Thank you for testing, I have updated the bug tags and so the fixed foomatic-filters package will soon be added to the official updates so that everyone gets it with his daily updates.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package foomatic-filters - 4.0.3-0ubuntu2.2

---------------
foomatic-filters (4.0.3-0ubuntu2.2) karmic-proposed; urgency=low

  * debian/patches/20_foomatic-rip-suppress-page-accounting.dpatch:
    Make the insertion of page accounting code into PostScript data streams
    actually suppressed if instructed appropriately by the PPD file
    (especially for Foomatic/Postscript PPDs) (LP: #513690).
 -- Till Kamppeter <email address hidden> Mon, 15 Feb 2010 19:51:17 +0100

Changed in foomatic-filters (Ubuntu Karmic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
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.