After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 365332 - Printing copies=2,collate puts pages back-to-back
Printing copies=2,collate puts pages back-to-back
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
0.6.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-26 15:45 UTC by john
Modified: 2008-03-18 11:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fix collate and other printing issues (1.43 KB, patch)
2008-03-17 20:38 UTC, Eugen Dedu
committed Details | Review

Description john 2006-10-26 15:45:15 UTC
Printing from Evince 0.6.1 with copies=2,collate set in the print dialogue box to a CUPS printer queue which has duplex=on,collate=off causes the two copies to print with their pages back-to-back (i.e. page1/page1, page2/page2, ...)

I don't think that this is a CUPS bug, as I can print to the same printer from the command line with correct results.

John A. Murdie
Comment 1 john 2006-10-26 18:11:14 UTC
The problem seems to be that the sense of the Collate tick box has inverted effect (untick to Collate). But also, ticking Duplex seems to have no effect at all: I have a CUPS printer queue which has Duplex as the default. When printing two copies of a document with an odd number of pages with the Collate box unticked (so as to cause collation), the copies follow directly on from each other (the second printing incorrectly on the unused last even side of the first) regardless of whether Duplex is ticked or not. So, one cannot separate the two (or more!) printed copies of the document.

In any case, I'd expect that Evince should query CUPS to find out whether duplexing has been requested or not, so that Evince can do the right thing - either putting in the blank separating page itself or, much better, informing CUPS that two copies of the file should be printed (without actually sending two copies of the data).

John A. Murdie
Comment 2 Jo Wyta 2007-03-02 12:55:33 UTC
Are you using manual duplexing or does your printer have a duplexer?  In my case the printer has a duplexer and ticking duplex pus it into action.  However, if I try to print two copies the pages get displaced.  The document concerned has three pages ( http://www.faslane365.org/files/LegalBriefing.pdf ).  The first page of the second copy gets printed on the back of the last page of the first.
Comment 3 john 2007-03-02 14:18:48 UTC
(In reply to comment #2)
> Are you using manual duplexing or does your printer have a duplexer?  In my
> case the printer has a duplexer and ticking duplex pus it into action. 
> However, if I try to print two copies the pages get displaced.  The document
> concerned has three pages ( http://www.faslane365.org/files/LegalBriefing.pdf
> ).  The first page of the second copy gets printed on the back of the last page
> of the first.
> 

I'm using the automatic duplexing feature of an HP LaserJet 8150dtn, Evince 0.6.1 and CUPS 1.2.8 (the latest stable version as I write). I see exactly what I have seen before, and what you now see, with your document.
Comment 4 john 2007-03-02 14:22:05 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Are you using manual duplexing or does your printer have a duplexer?  In my
> > case the printer has a duplexer and ticking duplex pus it into action. 
> > However, if I try to print two copies the pages get displaced.  The document
> > concerned has three pages ( http://www.faslane365.org/files/LegalBriefing.pdf
> > ).  The first page of the second copy gets printed on the back of the last page
> > of the first.
> > 
> 
> I'm using the automatic duplexing feature of an HP LaserJet 8150dtn, Evince
> 0.6.1 and CUPS 1.2.8 (the latest stable version as I write). I see exactly what
> I have seen before, and what you now see, with your document.
> 

Oops - I didn't read what you wrote carefully enough. I see exactly what I saw before - the two page 1s back to back, ditto pages 2 and 3. You have seen something different!
Comment 5 Eugen Dedu 2008-03-17 20:38:48 UTC
Created attachment 107479 [details] [review]
Fix collate and other printing issues

Hi,

This patch inverts the collate action in order to act as shown by the gtkprint dialog box.

It also fixes the following unreported bugs:
- number of copies does not work (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=462623, issue number 2)
- reverse printing starts with an additional blank page

Please check it if it is good and check it in.

Cheers,
Eugen Dedu
Comment 6 Wouter Bolsterlee (uws) 2008-03-17 22:27:07 UTC
(In reply to comment #5)
> - reverse printing starts with an additional blank page

Confirming this issue---seeing that here as well.
Comment 7 Wouter Bolsterlee (uws) 2008-03-17 22:29:38 UTC
>+		page = job->reverse ? ((n_pages - 1) / job->pages_per_sheet) * job->pages_per_sheet : 0;

what exactly is calculated here?

>+		n_copies = job->collate ? 1 : job->copies;

This is most certainly right ;)
Comment 8 Carlos Garcia Campos 2008-03-18 10:47:01 UTC
I don't know why, but I thought collate was the opposite :-P I've just committed the patch to svn trunk. Thank you very much. 
Comment 9 Eugen Dedu 2008-03-18 11:42:40 UTC
Hi,

(In reply to comment #6)

>+		page = job->reverse ? ((n_pages - 1) / job->pages_per_sheet) * job->pages_per_sheet : 0;

what exactly is calculated here?

page is the first page to print.  It is from 0 to n_pages-1 (not to n_pages, as previously).

I intend to add a few comments very soon (I see that evince has no comments :o( ), when I fix bug http://bugzilla.gnome.org/show_bug.cgi?id=460267 too.

Cheers,
Eugen Dedu