Issue 83398

Summary: correct operation of simplex/duplex paging relies on PPD default matching the current printer setting (which can change)
Product: gsl Reporter: spwalmsley <sean>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 2.3   
Target Milestone: OOo 3.x   
Hardware: Sun   
OS: Unix, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description spwalmsley 2007-11-07 01:11:48 UTC
SIMPLEX/DUPLEX PRINTING ISSUE IN PSPRINT

We have an HP 9040DN duplexing printer which we have set to default to duplex
printing via its built-in web server. We installed the HP supplied PPD file in
the OpenOffice printer drivers directory and then defined two printers based on
this driver in the OpenOffice printer administration utility:

1) printer "A" with duplexing on (Printer Administration -> Paper -> Duplex ->
Long Edge)
2) printer "B" with duplexing off (Printer Administration -> Paper -> Duplex -> Off)

Printer "A" works fine and duplexes as expected. Printer "B" works, but the
pages are also duplexed, i.e. the simplex setting doesn't have any effect.

The reason for this appears to be that the entries written to the user's
psprint.conf take into account the value of the "DefaultDuplex:" setting in the
PPD file. Since the actual printer default is user selectable, it is easy for a
mismatch to occur between the PPD file default setting and the actual printer
default.

In our case, OpenOffice omits the "PPD_Duplex=None" entry from the user's
psprint.conf file for the simplex printer because it considers this to be the
printer's default value (even though it isn't). If we:

- manually edit the PPD file (>100Kb of Postscript gibberish to wade through
which we consider beyond the average user) to change the default value to
"DefaultDuplex: DuplexNoTumble"
- delete our printers
- re-create our printers

then everything works okay. By this, I mean that the user's simplex psprint.conf
entry will now include a "PPD_Duplex=None" entry because OpenOffice now knows
that it has to take explicit action to produce simplex output.

I assume that the opposite situation could also occur, i.e. that a printer whose
PPD file defined duplex to be the default but that was actually set to simplex
by default would only print simplex (i.e. specifying duplex in the printer
administration utility would have no effect).

Note that the root cause of this problem is the mismatch between the PPD file
and the actual printer setting, however this mismatch is *VERY* likely to occur
since the printer setting is easy to change and the mucking with the PPD file
may not occur to the average user. Even if the user did know enough to edit the
PPD file, changing it is non-trivial.

To fix this issue, the printer administration utility should be changed to
include simplex/duplex directives for duplex capable printers *REGARDLESS* of
the default in the PPD file. For example, printers defined in the printer
administration utility as simplex should *ALWAYS* include the "PPD_Duplex=None"
entry, and printers defined as duplex should *ALWAYS* include the duplex
setting. This would vastly improve the robustness of OpenOffice's simplex/duplex
support.

WORKAROUND: Edit the site PPD printer driver to match the current setting, then
 reset the simplex/duplex property of each affected printer in the printer
administration utility. This is an undesirable workaround because it is
complicated, and because subsequent changes to the printer default would require
the workaround to be reapplied.
Comment 1 philipp.lohmann 2007-11-07 09:44:49 UTC
No patch -> no patch flag

confirmed

Your analysis is of course completely correct, psprint does not emit the default
values in the PPD. However this is true for every value, not only Duplex. I'm 
not sure that we want to do that for every PPD feature.

Perhaps it would be best to have an "enforce setting" checkbox next to the
duplex setting that if check would enforce emitting the default value. Another
settings that would possibly need this is paper tray. The page size on the other
hand is always overridden by the document anyway, so it needs no such
"enforcement" setting.

What is your opinion ?
Comment 2 spwalmsley 2007-11-08 00:45:02 UTC
I think that enforcement check boxes might be confusing - users might say "well
of course I want it enforced, that's why I selected it in the first place!".

As I see it, the definitive fix would involve providing some kind of utility to
allow the user to easily keep the PPD file synchronized with the actual printer
defaults. Short of that type of (unlikely) large-scale project, I think that
automatically enforcing those values that are likely to get out of sync (e.g.
simplex/duplex, paper tray as you say) might produce the best payback.

Another alternative might be to have a global "ignore PPD defaults" checkbox
which would apply to all PPD settings. This checkbox could include a note below
it that explained that if the printer only worked "properly" with the checkbox
checked, then manual editing of the PPD file to make its defaults match the
printer's defaults is indicated.
Comment 3 philipp.lohmann 2007-11-30 11:01:27 UTC
target
Comment 4 philipp.lohmann 2008-05-28 16:42:26 UTC
target
Comment 5 Rob Weir 2013-07-30 02:19:29 UTC
Reset assignee on issues not touched by assignee in more than 2000 days.