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 128036 - Separate copies printed on same duplex sheet
Separate copies printed on same duplex sheet
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: Postscript backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Andreas J. Guelzow
Depends on:
Blocks:
 
 
Reported: 2003-11-27 09:42 UTC by Jon Kåre Hellan
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Postscript file which prints as duplex (144.20 KB, application/postscript)
2003-11-28 14:32 UTC, Jon Kåre Hellan
Details
postscript test file (162.00 KB, application/postscript)
2003-12-02 17:05 UTC, Andreas J. Guelzow
Details
postscript test file #2 (161.27 KB, application/postscript)
2003-12-03 03:21 UTC, Andreas J. Guelzow
Details
postscript testfile #3 (131.78 KB, application/postscript)
2003-12-03 06:17 UTC, Andreas J. Guelzow
Details
postscript test file #2a (161.29 KB, application/postscript)
2003-12-03 17:15 UTC, Andreas J. Guelzow
Details
postscript testfile #3a (131.79 KB, application/postscript)
2003-12-03 17:18 UTC, Andreas J. Guelzow
Details

Description Jon Kåre Hellan 2003-11-27 09:42:10 UTC
Print a very small gnumeric sheet on a duplex printer and ask for 2 copies.
The printer prints a single sheet of paper with the gnumeric sheet on both
sides.

Version 2.4.2
Comment 1 Andreas J. Guelzow 2003-11-27 15:59:05 UTC
when printing multiple copies libgnomeprint simply dulicates the pages
(even if we don't want to collate). As a result the printer can't tell
that a new document starts.

As a fix, in the case of collated output, rather than sending one
print job with 2 copies we could send 2 print jobs. This would work
unless we are really printing to afile or such.

As a workaround, one can print a single copy and specify the multiple
copies in the print command lpr...
Comment 2 Andreas J. Guelzow 2003-11-27 20:45:59 UTC
Hi Jon-Kåre,

Would you be able to create a small ps file that shows what is being
send to your printer to cause it to print in duplex in the first place?

Please double check that sending that ps file to the printer still
shows the problem.

Thanks
Comment 3 Jon Kåre Hellan 2003-11-28 14:32:37 UTC
Created attachment 21897 [details]
Postscript file which prints as duplex
Comment 4 Andreas J. Guelzow 2003-11-28 15:29:42 UTC
Hi,

unfortunately I don't have a duplex printer available to test things
out. So it would be great if you would

(1) try out the following file on your duplex printer

(2) attach another duplex printing file but with 3 pages (so that we
should get 1double sided plus one single-sided) with numcopies=2.

Thanks

------------------
PS: As far as I can tell the file you attached should never have
printed in duplex, since postscript defaults to non-duplex even for
duplex-able printer and the file does not requests duplex. Apparently
in some postscript interpreters the default is different.
Comment 5 Andreas J. Guelzow 2003-11-28 17:19:55 UTC
Ah, I see. Your test-code calls:

g_object_set (preview, "nx", 2, "ny", 2, NULL);

Requiring applications to do that would be a significant and very
undesirable change in the API. 

THe calling application normally should only need to call
gnome_print_job_preview_new.

But that should be an easy fix, I'll try it out on the weekend.
Comment 6 Andreas J. Guelzow 2003-11-28 22:39:34 UTC
Please ignore my last comment that was for a different bug.
Comment 7 Andreas J. Guelzow 2003-12-02 16:27:48 UTC
Well, it's pretty easy to see how we should change the resulting
posscript file. On the other hand, the layering of various print
engines within gnomeprint make it very difficult to implement those
changes.
Comment 8 Andreas J. Guelzow 2003-12-02 17:05:22 UTC
Created attachment 22020 [details]
postscript test file
Comment 9 Andreas J. Guelzow 2003-12-02 17:07:17 UTC
Hi Jon-Kåre,

please try to print the attached file on your duplex postscript
printer and let us know the result.

Thanks
Comment 10 Andreas J. Guelzow 2003-12-03 02:48:51 UTC
Sorry, that file won't work. I got carried away and it will never
print in duplex.
Comment 11 Andreas J. Guelzow 2003-12-03 03:21:22 UTC
Created attachment 22039 [details]
postscript test file #2
Comment 12 Andreas J. Guelzow 2003-12-03 03:25:03 UTC
Hi Jon-Kåre,

another attempt. Please try this one. It consists of 2 copies of a 3
page duplex document. So you should get 4 sheets.
Comment 13 Andreas J. Guelzow 2003-12-03 06:13:38 UTC
In addition to the above file it would be nice to know how the
following file prints. That file is a 3 page duplex file, 3 copies but
not collated. It uses the NumCopies feature rather than including 3
verbatim copies of each page.
Comment 14 Andreas J. Guelzow 2003-12-03 06:17:29 UTC
Created attachment 22044 [details]
postscript testfile #3
Comment 15 Jon Kåre Hellan 2003-12-03 14:47:07 UTC
Very strange, testfiles #2 and #3 do not result in output at all. Yes,
I've double checked.
Comment 16 Andreas J. Guelzow 2003-12-03 15:14:30 UTC
I am not completely surprised about #3. A duplex enabled printer
should try to keep page 1 in memory while printing the first copy of
page 2 on the reverse. Most printers will not have sufficient memory. 

It is surprising that #2 does not create any output, except: The paper
size used in A4. If your printer does not have that papersize
available it should shrink the page slightly according to the policies
set in ps file. 

Which papersize are you normally printing on?
Comment 17 Andreas J. Guelzow 2003-12-03 15:17:54 UTC
Do you have a libgnomeprint 2.5 installation? I am thinking of
committing my changes or sending you a diff and you could try things
out directly.
Comment 18 Andreas J. Guelzow 2003-12-03 17:15:53 UTC
Created attachment 22061 [details]
postscript test file #2a
Comment 19 Andreas J. Guelzow 2003-12-03 17:18:00 UTC
Created attachment 22062 [details]
postscript testfile #3a
Comment 20 Andreas J. Guelzow 2003-12-03 17:20:08 UTC
please try the fixed postscript files I just attached.
Comment 21 Andreas J. Guelzow 2003-12-03 17:52:31 UTC
It seems my changes have the desired effect. I will commit these
changes to cvs HEAD (2.5.x) tonight. 

I will still have to review them to see whether we can backport them
reasonably to gnome-2-4.
Comment 22 Jon Kåre Hellan 2003-12-04 13:38:26 UTC
This fixes the problem here. 2 copies of a small sheet end up on
separate sheets of paper.
Comment 23 Andreas J. Guelzow 2003-12-04 15:47:22 UTC
I have backported all but the ui to gnome-2-4. So please give it a
spin. (I had to change the code slightly after creating those
postscript files  to obey the document structure convention, so I
might have introduced some bug.)