JDK-4204353 : printing problems in JDK1.2 using HotJava bean
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_95,windows_nt
  • CPU: generic,x86
  • Submitted: 1999-01-20
  • Updated: 1999-04-23
  • Resolved: 1999-04-23
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.
Other
1.2.2 1.2.2Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Description
This is following on from 4157453, which has got somewhat muddled and
is not a complete statement of the current problem/issues (which have
been going on for a long time now)

A licensee has developed a large application on JDK1.2. It uses
the HotJava bean as a printing engine. The HTML files that the app
prints contain a mixture of images and text and there are two
problems.

1. The resulting printed output is corrupted in a number of ways
   -- see attachment BAD.JPG for an example. The text is rendered
   in very poor quality. The images are also very poor quality. 
   It also looks like small circular white blobs have been drawn
   on top of the text and the images. These blobs are about the same
   size as the small bullet images that did not appear at all.
   Compare with GOOD.JPG to see where they should go. Some images
   are not printed at all.

2. The second problem is that printing to PostScript printers
   does not work at all. A large output file is produced which when
   using the HotJava bean always produces a blank page. This is a known
   problem (described in 4173275)

Note, the problems do not occur using the same test, same bean with JDK1.1.7

Attached are:
  - TEST.ZIP A copy of the bean, the test app and the HTML page that 
             shows these problems.
  - GOOD.JPG A piece of a scanned printed page produced by running the test case
             using JDK1.1.7.
  - BAD.JPG  A piece of a scanned printed page produced by running test
             with JDK1.2.

To run the test, extract the zip file somewhere, set CLASSPATH=.;HotJavaBean.jar
For JDK1.2 run:
   oldjava TestBrowser
For JDK1.1.7 run:
   java TestBrowser

type in the URL:   file:/path_to_install_dir/test/test.html
and press the Print button when the page loads.

Finally, case 2 can be reproduced using any Postscript printer.
Case 1 was tested here using a HP LaserJet 5Si MX using the
following driver files:
  PCL5EMS.DLL (4.00)
  PJLMON.DLL (4.00)
  RASDD.DLL (4.00)
  RASDDUI.DLL (4.00)
  RASDDUI.HLP
  
Would like to see a solution to these problems for Cricket release.

=================================================================
I should have added that this is a Windows problem.
PostScript printing seems to work okay on Solaris.

michael.mcmahon@ireland 1999-01-25
=================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.2.2 INTEGRATED IN: 1.2.2
14-06-2004

EVALUATION The testcase for this bug exhibits two problems: 1. text rendering does not work in 1.2.x 2. image rendering does not work in a special case (as described by Hongfeng's update in the Workaround field of this bug report). Mingyao, Hongfeng have developed a prototype with Jim Graham's guidance that will render text successfully by avoiding read/write on the printing device and instead doing fillRects while scanning the lines. What is left to be done are as follows: 1. transformation from 72dpi to printer's resolution at java level 2. the prototype needs to be reviewed together with Jim to identify codepaths that can be further optimized. Note that this project will only address the text rendering problem but not the image rendering problem described by Hongfeng. patrick.ong@Eng 1999-03-23 Note that this project will also address the problem identified in 4157453 which is more focused on text rendering. patrick.ong@Eng 1999-03-23
23-03-1999

WORK AROUND If we implement the fix proposed by Mingyao Yang in bug 4157453, and do the following workaround, the bug is resolved in our testing: The workaround is not to put an image (picture) and the <UL>...</UL> list in the same table cell if the image is to come before the list. To show it more clearly, here is part of the original html code from the test.html file attached to this bug report: <TR> <TD COLSPAN=3> <STRONG>Some cool <IMG SRC="images/java1.gif" > applets</STRONG> <UL> <LI><A HREF="http://www.ireland/~michaelm/nycity/transit.html">Interactive New York City Subway map</A></LI> : : </UL> </TD> </TR> You can see that the image 'java1.gif' is in the same table cell as the <UL> list. Just make the following change and the page will be printed correctly: <TR> <TD COLSPAN=3> <STRONG>Some cool <IMG SRC="images/java1.gif" > applets</STRONG> </TD> </TR> <TR> <TD COLSPAN=3> <UL> <LI><A HREF="http://www.ireland/~michaelm/nycity/transit.html">Interactive New York City Subway map</A></LI> : : </UL> </TD> </TR> hongfeng.shen@eng 1999-03-03
03-03-1999