Bug 216332 - Presentation duplex printing doesn't even out duplexed pages
Presentation duplex printing doesn't even out duplexed pages
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: openoffice.org (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Caolan McNamara
:
: 216140 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-19 06:57 EST by Tim Waugh
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.2.1-17.2.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-31 13:52:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
replacement /usr/lib/openoffice.org/program/libsvt680li.so (3.50 MB, application/octet-stream)
2007-05-01 12:15 EDT, Caolan McNamara
no flags Details
replacement verbose /usr/lib/openoffice.org/program/libpsp680li.so (797.05 KB, application/octet-stream)
2007-05-02 07:00 EDT, Caolan McNamara
no flags Details
replacement /usr/lib64/openoffice.org/program/libsvt680li.so (4.56 MB, application/octet-stream)
2007-05-03 04:09 EDT, Caolan McNamara
no flags Details
replacement verbose /usr/lib64/openoffice.org/program/libpsp680li.so (894.57 KB, application/octet-stream)
2007-05-03 04:11 EDT, Caolan McNamara
no flags Details
park this here in case I delete it or do something else equally stupid (7.55 KB, patch)
2007-05-09 06:52 EDT, Caolan McNamara
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenOffice.org 22304 None None None Never

  None (edit)
Description Tim Waugh 2006-11-19 06:57:48 EST
Description of problem:
When printing more than one copy of a presentation containing an odd number of
pages to a duplex printer with duplexing on, the last and first pages run
together on one sheet.

Version-Release number of selected component (if applicable):
openoffice.org-core-2.0.4-5.5.3

How reproducible:
100%

Steps to Reproduce:
1.New presentation from template 'Introducing a new product'
2.File->Print, select duplex-capable printer
3.Set 'Print Pages' page range to '1' (just saves paper)
4.Set Copies to 2, and Collate on
5.In 'Page Setup' set the Two-sided option to 'Short Edge (Flip)'
6.Click Print

Actual results:
Single sheet with same slide on both sides.

Expected results:
Two sheets, each with slide on one side and blank reverse side.

Additional info:
This doesn't happen with OpenOffice.org Writer, so it's probably something
specific to the Spreadsheet app.  It might be something like that OOo is
manually generating multiple copies and then setting Duplex on -- when what it
should do it just tell CUPS how many copies to print in the job options, and set
Duplex in the job options as well.  That way CUPS can work out what needs to be
done to even out duplexed copies.
Comment 1 Tim Waugh 2006-11-19 06:59:04 EST
*** Bug 216140 has been marked as a duplicate of this bug. ***
Comment 2 Caolan McNamara 2007-02-01 10:31:00 EST
This is still a problem, i.e. it didn't get magically fixed with the last OOo
FC-6 update ?
Comment 3 Tim Waugh 2007-02-05 10:23:01 EST
Still a problem.
openoffice.org-core-2.0.4-5.5.10
Comment 4 Caolan McNamara 2007-05-01 10:25:39 EDT
hmm, indeed. looks like we just don't use cups for any of this stuff. Perhaps
the best thing would be to just chop out all the OOo multi platform DIY magic
and make it make simple single copies and let cups do all this foo for it.
Comment 5 Caolan McNamara 2007-05-01 12:15:11 EDT
Created attachment 153865 [details]
replacement /usr/lib/openoffice.org/program/libsvt680li.so

So (on FC-7) does replacing /usr/lib/openoffice.org/program/libsvt680li.so with
this attachment "do the right thing(tm)" ?
Comment 6 Tim Waugh 2007-05-02 06:02:26 EDT
No, it doesn't.

Printing two copies of a single-page document results in four sheets coming from
the printer, the first and third of which contain the document.

Printing one copy of a 2-page document results in two complete double-sided
sheets containing the document, i.e. two copies instead of one!
Comment 7 Caolan McNamara 2007-05-02 06:59:39 EDT
That's depressing, I thought that would work :=) I must be missing something
obvious. I don't get the extra pages on my non-duplex. With the above OOo itself
should just be giving cups a simple single copy of the .ps with no /ncopies or
self made extra copies. i.e setting 2 copies and collate on or off and print to
file should show in evince a single page, and grep pages output.ps should show
nothing. So if the above holds for you as well, I must assume I'm passing cups
incorrect options, or doing something very obviously wrong.

I'll attach another replacement .so which will replace
/usr/lib/openoffice.org2.0/program/libpsp680.so

That lib will on stdout output the cups options used to print the .ps, and copy
the generated .ps to ~/cupsprint.ps, maybe if you've the time to check it out,
something obvious will jump out at you.
Comment 8 Caolan McNamara 2007-05-02 07:00:45 EDT
Created attachment 153930 [details]
replacement verbose /usr/lib/openoffice.org/program/libpsp680li.so
Comment 9 Tim Waugh 2007-05-02 12:56:39 EDT
Okay, the extra pages were partly due to an incorrect page size in my test
document.  However, even with that corrected I still get an extra sheet fed
after a 1-copy 1-page print.  Haven't managed to track down why yet.

1-copy 2-page print correctly feeds one sheet and prints on both sides.

2-copy 3-page print incorrectly prints on first side of first sheet and ejects,
first side of second sheet (upside down), then feeds another two sheets blank. 
It's a complete disaster in all sorts of ways.

However, I'm not sure I can trust the hardware any more.  Rebooting to
known-good software (RHEL-5) shows the same behaviour. :-(
Comment 10 Caolan McNamara 2007-05-03 04:09:57 EDT
Created attachment 154009 [details]
replacement /usr/lib64/openoffice.org/program/libsvt680li.so

64bit equivalents
Comment 11 Caolan McNamara 2007-05-03 04:11:29 EDT
Created attachment 154010 [details]
replacement verbose /usr/lib64/openoffice.org/program/libpsp680li.so

64bit version
Comment 12 Caolan McNamara 2007-05-03 04:22:38 EDT
caolanm->jnavrati: I only have one printer here, and it doesn't do duplex :-( I
don't get any of the extra empty pages etc on such a simple printer. Can you
give this a whirl with a duplex printer in your office and see if you get the
same behaviour as twaugh when the various duplex options with or without collate
is enabled.

All that the above .sos should do is tell the OOo core from the print dialog
that we want just want a simple single copy .ps output to the printer no matter
how many we ask to print, and then at the actual cups print time we tell cups
that we had wanted to do Duplex and how many copies we had wanted. Cutting the
OOo core out of the loop and pushing the work to cups. What options we want cups
to use should be output on standard output.

twaugh: The replacements sos also make a copy of the printed .ps to
"~/cupsprint.ps", perhaps if you just take that .ps output and from the command
line print it with lpr and set the num copies and duplex etc we can see if the
behaviour is the same as from using print in OOo. I suppose if it behaves the
same, that the remaining comparison would be against what happens on printing
from the command line ps generated from e.g. gedit
Comment 13 Tim Waugh 2007-05-04 11:37:58 EDT
caolan: I hope to get replacement hardware in the next week or two.  Without
reliable hardware there's not a lot I can do to help test it.  I did try to
submit the PostScript outside of OpenOffice.org, and with different options, but
as I said a known-working software set up also failed.
Comment 14 Caolan McNamara 2007-05-04 11:49:27 EDT
There's no major hurry, it's been like this for years already so I don't intend
to make any printing changes just before FC-7 anyway. When I get my next build
sorted out, then jnavrati may be able to test the above x86_64 replacements in
brnu where there's reportedly a few expensive multi-featured printers. If we
finally get this sorted out and working in rawhide then we might backport.
Comment 15 Tim Waugh 2007-05-08 12:17:46 EDT
Okay, tested with a replacement duplex printer, and all works fine.

cupsPrintFile( DESKJET_980C, /tmp/F8PEcB, Untitled1, 10, 0x976f1f0 ) returns 35
    option PrintoutMode=Normal
    option copies=2
    option InputSlot=Default
    option job-priority=50
    option Collate=True
    option number-up=1
    option Quality=FromPrintoutMode
    option job-sheets=none,none
    option PageSize=A4
    option Duplex=DuplexNoTumble

THis was for two copies of a three-page document, and I got:

front  back
+---+  +---+
|1  |  |2  |
|   |<>|   |
|   |  |   |
+---+  +---+

+---+  +---+
|3  |  |   |
|   |<>|   |
|   |  |   |
+---+  +---+

as expected.

This was with the drop-in bits, libsvt680li.so and libpsp680li.so, on Fedora 7.

For what it's worth, I also tried the same test from Fedora Core 6 and *that*
works fine now too (openoffice.org-core-2.0.4-5.5.22) -- however, the "let CUPS
figure it out" approach is the way forward anyway I think.

By the way, the cupsprint.ps file still has several '%%IncludeFeature:' clauses
-- I don't think we need them now do we?  E.g.:

[{
%%IncludeFeature: *PrintoutMode Normal
} stopped cleartomark
[{
%%IncludeFeature: *Quality FromPrintoutMode
} stopped cleartomark
[{
%%IncludeFeature: *InputSlot Default
} stopped cleartomark
[{
%%IncludeFeature: *PageSize A4
} stopped cleartomark
[{
%%IncludeFeature: *Duplex DuplexNoTumble
} stopped cleartomark

Removing those lines from the PostScript file and submitting it again with the
options it had before gives the same end result.
Comment 16 Caolan McNamara 2007-05-08 14:19:38 EDT
groovy, I'll do this for > FC-7 then. Printing is too much of a mine field to
enter right before a release.

Yeah, I also need to remove those IncludeFeature things. What I want to do is
just to remove them if we print from the gnomeprint dialog, but leave them there
if printing from the "traditional" dialog. Gives is an escape hatch route of a
"does it work if you try the other dialog" nature.
Comment 17 Tim Waugh 2007-05-09 04:48:42 EDT
Sounds good!
Comment 18 Caolan McNamara 2007-05-09 06:52:37 EDT
Created attachment 154386 [details]
park this here in case I delete it or do something else equally stupid
Comment 19 Caolan McNamara 2007-05-21 09:51:38 EDT
checked in to devel, will be in F-8
Comment 20 Fedora Update System 2007-07-30 12:58:47 EDT
openoffice.org-2.2.1-18.1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.