GNOME Bugzilla – Bug 128036
Separate copies printed on same duplex sheet
Last modified: 2004-12-22 21:47:04 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
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...
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
Created attachment 21897 [details] Postscript file which prints as duplex
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.
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.
Please ignore my last comment that was for a different bug.
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.
Created attachment 22020 [details] postscript test file
Hi Jon-Kåre, please try to print the attached file on your duplex postscript printer and let us know the result. Thanks
Sorry, that file won't work. I got carried away and it will never print in duplex.
Created attachment 22039 [details] postscript test file #2
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.
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.
Created attachment 22044 [details] postscript testfile #3
Very strange, testfiles #2 and #3 do not result in output at all. Yes, I've double checked.
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?
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.
Created attachment 22061 [details] postscript test file #2a
Created attachment 22062 [details] postscript testfile #3a
please try the fixed postscript files I just attached.
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.
This fixes the problem here. 2 copies of a small sheet end up on separate sheets of paper.
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.)