ghostscript ignores "copies" in postscript

Bug #320391 reported by Jörg BUCHMANN
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GS-GPL
Fix Released
Wishlist
cups (Ubuntu)
Fix Released
Medium
Martin Pitt
ghostscript (Ubuntu)
Fix Released
Medium
Till Kamppeter

Bug Description

The current error exists under Ubuntu 8.10 and the current test release
when printing from openoffice

It is impossible for me to print multiple copies of the same document from openoffice and I have this problem with all my different printers.

When I choose for example 3 copies in the print window I actually get only one copy printed. I have tried this with a simple document containing just "test" as content as well as more complicated documents containing pictures.

My printers are Xerox 8860 and HP LaserJet 3055, both are network printers with their own network card.

I don't have the problem printing with firefox, for example, only from openoffice.

Related branches

Revision history for this message
Chris Crisafulli (itnet7) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Unfortunately, we can't fix it because your description didn't include enough information. You may find it helpful to read "How to report bugs effectively" http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful if you would then provide a more complete description of the problem.

We have instructions on debugging some types of problems at http://wiki.ubuntu.com/DebuggingProcedures

At a minimum, we need:
1. the specific steps or actions you took that caused you to encounter the problem,
2. the behavior you expected, and
3. the behavior you actually encountered (in as much detail as possible).
Thanks!

description: updated
Revision history for this message
Jörg BUCHMANN (jorg-buchmann) wrote : Re: [Bug 320391] Re: impossible to print multple copies under ubuntu 8.10 and the current test release

I have updated the bug report and tried to give as much information as I
could, but if you have any special question, you are always welcome to ask.

Kind regards,

Jörg BUCHMANN

Chris Crisafulli a écrit :
> Thank you for taking the time to report this bug and helping to make
> Ubuntu better. Unfortunately, we can't fix it because your description
> didn't include enough information. You may find it helpful to read "How
> to report bugs effectively"
> http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. We'd be grateful
> if you would then provide a more complete description of the problem.
>
> We have instructions on debugging some types of problems at
> http://wiki.ubuntu.com/DebuggingProcedures
>
> At a minimum, we need:
> 1. the specific steps or actions you took that caused you to encounter the problem,
> 2. the behavior you expected, and
> 3. the behavior you actually encountered (in as much detail as possible).
> Thanks!
>
> ** Changed in: ubuntu
> Status: New => Incomplete
>
>

Revision history for this message
Chris Crisafulli (itnet7) wrote : Re: impossible to print multple copies under ubuntu 8.10 and the current test release

Bug #50457 is very similar, and indicates at one time this was a known issue, but although it's status says "Fix released" they are referring to it being fixed by upgrading to Hardy Heron. Can I ask how you installed your hp printer? Did you use Cups Manager and accept the default drivers or did you go out to http://hplipopensource.com/hplip-web/index.html and use this method?

Revision history for this message
Jörg BUCHMANN (jorg-buchmann) wrote : Re: [Bug 320391] Re: impossible to print multple copies under ubuntu 8.10 and the current test release

I have encountered this problem on a completely new installation of
intrepid ibex and also on a new installation of the actual test version
of ubuntu.

Chris Crisafulli a écrit :
> Bug #50457 is very similar, and indicates at one time this was a known
> issue, but although it's status says "Fix released" they are referring
> to it being fixed by upgrading to Hardy Heron. Can I ask how you
> installed your hp printer? Did you use Cups Manager and accept the
> default drivers or did you go out to http://hplipopensource.com/hplip-
> web/index.html and use this method?
>
> ** Changed in: openoffice.org (Ubuntu)
> Sourcepackagename: None => openoffice.org
>
>

Revision history for this message
Jörg BUCHMANN (jorg-buchmann) wrote :

By the way, I have used the ubuntu Printer setup system and use the
default printer settings and drivers.

Jörg BUCHMANN a écrit :
> I have encountered this problem on a completely new installation of
> intrepid ibex and also on a new installation of the actual test version
> of ubuntu.
>
> Chris Crisafulli a écrit :
>
>> Bug #50457 is very similar, and indicates at one time this was a known
>> issue, but although it's status says "Fix released" they are referring
>> to it being fixed by upgrading to Hardy Heron. Can I ask how you
>> installed your hp printer? Did you use Cups Manager and accept the
>> default drivers or did you go out to http://hplipopensource.com/hplip-
>> web/index.html and use this method?
>>
>> ** Changed in: openoffice.org (Ubuntu)
>> Sourcepackagename: None => openoffice.org
>>
>>
>>
>
>

Revision history for this message
Chris Cheney (ccheney) wrote : Re: impossible to print multple copies under ubuntu 8.10 and the current test release

This appears to be a driver issue as printing to cups-pdf works fine.

Revision history for this message
bigal50 (bigal50) wrote :

I can duplicate this problem on my HP PSC 2350 directly connected to Jaunty A6 using Open Office

Work around:
I am able to print multiple copies if the collate option is checked. Which on my system is checked by default.

Allen

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

Anyone with the problem please do

cupsctl LogLevel=debug
cancel -a

Then try to print a document with more than one copy. After the job has disappeared from the queue or turned into "Stopped" state, do

sudo cp /var/log/cups/error_log ~
sudo chmod 777 ~/error_log

and attach ~/error_log to this bug report.

This probably the same as bug 345183. Please check especially whether your error_log contains something like "freed object:9 found".

Revision history for this message
bigal50 (bigal50) wrote :

Here's the log file but I don't think that it will be of any help. For what ever reason when I tried printing the same file that I printed when reporting that I also had this printing problem.

I am running Jaunty A6 AMD64 with current updates.

Maybe some else can send the error log for Intrepid

Allen

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

I have found two jobs in your error_log (123, 124). Both have a copy count of 1 ('argv[4]="1"'). The first job has 5 pages, the second has 2 pages. How many pages does your original document contain and how many copies did you request via the OpenOffice.org printing dialog?

Can you do the following:

1. Clean up your print queue:

cancel -a

2. Disable your print queue with system-config-printer or via

cupsdisable <queue name>

3. Open your test file with OpenOffice.org and print it. Select more than one copy. Wait until the dialog disappears and the progress bar fills up and disappears.

4. Now capture the file which got sent to CUPS:

sudo cp /var/spool/cups/d* ~
chown <your user name> d*

If there is more than one file, the newest file should be the relevant. Open it with a PostScript viewer. How many copies of your test file does it contain?

5. Re-enable the queue and wait until your file gets printed. How many copies of your test file come out. Use system-config-printer or

cupsenable <queue name>

6. Attach your original OpenOffice.org file and the d* file which you captured from CUPS to this bug report.

Revision history for this message
bigal50 (bigal50) wrote :

My mistake, multiple copies still doesn't work unless you check collate.

The page count of the other 2 print jobs was correct, and I only told it to print 1 copy so that was also correct, my mistake.

The d* file only had one copy consisting of 2 pages

Attached the files you requested

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

Your new test jobs (137 and 128) have also a copy count of 1.

Then this is a bug of OpenOffice.org. It generates only one copy and sends it with a copy count of 1 (as long as "Collate" is not set in the printing dialog). So CUPS cannot do anything else than printing one copy.

Moving to openoffice.org

Revision history for this message
Chris Cheney (ccheney) wrote :

Till,

So to be certain I understand you correctly, the fact that there is only one copy in the postscript output is proof that it is not working correctly? I need to send this bug upstream and I want to make sure I tell them the correct steps to reproduce the problem. I already verified this problem appears to be an upstream issue after following the steps you mentioned.

Thanks,

Chris Cheney

Changed in openoffice.org (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Chris Cheney (ccheney) wrote :

I do see a line like this in my postscript:

/#copies 500 def

Note I told OOo to print 500 copies to make it easier to grep for.

Revision history for this message
Chris Cheney (ccheney) wrote :

I also see in bigal50's last postscript file this:

/#copies 2 def
<< /NumCopies null /Policies << /NumCopies 1 >> >> setpagedevice
[{

Changed in openoffice.org (Ubuntu):
assignee: nobody → till-kamppeter
Revision history for this message
Chris Cheney (ccheney) wrote :

Oh... Is this another case of cups not honoring postscript commands and just using the arguments passed to it outside of the postscript?

"I have found two jobs in your error_log (123, 124). Both have a copy count of 1 ('argv[4]="1"'). The first job has 5 pages, the second has 2 pages. How many pages does your original document contain and how many copies did you request via the OpenOffice.org printing dialog?"

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

Strange for me is that PostScript commands should be obeyed by any PostScript interpreter, so a file containing

/#copies 500 def

should be shown 500 times by Ghostscript,

Note that this is a real PostScript variable definition and not a DSC comment (DSC comments should be handled by CUPS).

I have also tried to send the file unfiltered to a PostScript printer (HP LaserJet P3005) and the printer prints it correctly two times. So the bug is in Ghostscript. Moving ...

Revision history for this message
bigal50 (bigal50) wrote :

123 had 5 pages and 124 had 2 pages. In both cases I only requested 1 copy.

That was all my fault I was brain dead and thinking multiple pages not multiple pages/copies.

Chris Cheney (ccheney)
Changed in openoffice.org:
milestone: none → ubuntu-9.04
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Changed in ghostscript (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Adding CUPS task, as the pstopdf filter needs to call Ghostscript with "-dDoNumCopies" now.

Changed in cups (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ghostscript (8.64.dfsg.1-0ubuntu7) jaunty; urgency=low

  * debian/patches/40_pdfwrite-numcopies.dpatch: PDF output device of
    Ghostscript did not take into account /#copies or /NumCopies in the
    PostScript input, which made some applications, like OpenOffice.org
    print only one copy also if more than one copy is requested. No
    Ghostscript prints multiple copies with "pdfwrite" if it is called
    with "-dDoNumCopies" (LP: #320391, upstream bug #690355).

 -- Till Kamppeter <email address hidden> Sun, 5 Apr 2009 22:11:49 +0200

Changed in ghostscript (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The pstopdf filter change is now committed inro the Debian BZR repository of CUPS. pitti, can you upload CUPS to Debian and Ubuntu before RC freeze, thanks.

Changed in cups (Ubuntu):
assignee: nobody → pitti
status: In Progress → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have done a quick test now with a spreadsheet under OpenOffice.org, 2 pages, 2 copies, no collate, HP LaserJet 1020 (non-PostScript printer) and it works.

For immediate testing (before the CUPS package gets uploaded) download (from upstream)

http://www.openprinting.org/download/printing/pdf-printing/pstopdf

and replace your /usr/lib/cups/filter/pstopdf with it. Set the permissions:

chmod 755 /usr/lib/cups/filter/pstopdf

Make sure Ghostscript is updated and then try again.

Changed in cups (Ubuntu):
milestone: none → ubuntu-9.04
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cups - 1.3.9-17

---------------
cups (1.3.9-17) unstable; urgency=low

  [ Till Kamppeter ]
  * debian/filters/pstopdf: Added "-dDoNumCopies" to the "ps2pdf" call in
    the pstopdf CUPS filter, so that Ghostscript takes into account
    /#copies and /NumCopies when converting incoming PostScript to PDF
    (Ghostscript upstream bug #690355, LP: #320391).

  [ Martin Pitt ]
  * debian/control: Update section of cups-dbg to "debug".

 -- Martin Pitt <email address hidden> Sun, 05 Apr 2009 18:04:33 -0700

Changed in cups (Ubuntu):
status: Fix Committed → Fix Released
Changed in gs-gpl:
status: Unknown → Fix Released
Changed in gs-gpl:
importance: Unknown → Wishlist
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.