JDK-5066322 : REGRESSION: Printing duplex onto PostScript printers does not work.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2004-06-22
  • Updated: 2005-03-07
  • Resolved: 2005-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 betaFixed
Related Reports
Relates :  
Relates :  
Description
Name: rl43681			Date: 06/21/2004


FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Linux poirot.cs.ubc.ca 2.6.6 #12 Tue May 11 14:00:09 PDT 2004 i686 GNU/Linux

(but the problem is almost certainly OS independent)

EXTRA RELEVANT SYSTEM CONFIGURATION :
This occurs on both an HP Laserjet 4100dtn, and on an HP Laserjet 5siMX.

A DESCRIPTION OF THE PROBLEM :
Duplex printing does not work for the following reason: the postscript file sets the page size on every page (see the calls to setpagedevice in the included [shortened] PS file). This causes the printer to flush the current page, and hence defeats duplex printing. Printing to a file and removing the extra calls to setpagedevice manually does allow the file to print duplex as expected.

Printing the same document with 1.4.2 works normally, as the extraneous calls to setpagedevice aren't present.

%!PS-Adobe-3.0
%%BeginProlog
%%EndProlog
%%BeginSetup
<< /NumCopies 1 >> setpagedevice
<<  /Duplex true >> setpagedevice
%%EndSetup
%%Page: 1 1
<< /PageSize [612.0 792.0] /ImagingBBox null /ManualFeed false  >> setpagedevice
showpage
%%Page: 2 2
<< /PageSize [612.0 792.0] /ImagingBBox null /ManualFeed false  >> setpagedevice
showpage
%%EOF


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The contents of the HTML document, printed 2-sided.
ACTUAL -
The contents of the HTML document are printed 1-sided.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
source attached.
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
I don't know of any workaround, other than printing to a file, and manually editing the PostScript code.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

(Incident Review ID: 280275) 
======================================================================

Comments
EVALUATION ================ The setpagedevice command was added to fix the page selection bug, id 4886069. I think the problem is because this is sent per every page. We need to move this at the doc header instead. ###@###.### 2004-06-22 ==================================== As evaluated above, setpagedevice is causing the current page to be ejected. The page selection should be moved at startDoc and the use of setpagedevice should be limited only when the page format is different from the previous page. ###@###.### 2005-2-28 18:38:28 GMT
28-02-2005

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
15-08-2004