JDK-4173275 : Win32: need printing capability to write-only printer device.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_nt
  • CPU: x86
  • Submitted: 1998-09-14
  • Updated: 1999-05-20
  • Resolved: 1999-05-20
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
To reproduce this problem, run the printing regression test found at:
test/java/awt/PrintJob/PrintComponentTest.

With 2D fonts, the following problems are apparent:
 -- On the first page, all lightweight components are printed without their
    names.
 -- On the second page, names of lightweight components are rendered with lines
    radiating from the upper-left corner of the Component. Jim Graham previously
    looked at this problem and said "it should go away if we fix any of a
    number of bugs related to inefficient use of GDI functions to render curved
    paths (see 4152595 and 4152600)." (From the Evaluation for BugId 4151707.)
 -- On the second and third pages, the fonts rendered for heavyweight components
    are far too small.

With platform fonts, the following problems are apparent:
 -- On all three pages, the fonts rendered for heavyweight components are far
    too small.
 -- On the third page, the fonts rendered for lightweight components are far
    too small.
 (Also, on the second page, lightweight components do not appear at all. This
  is a known AWT problem, not a 2D problem.)

While fonts did not print perfectly for beta4, you could at least work-around
the rendering problems by reenabling platform fonts. Now, doing so introduces
another set of problems. At the very least, Graphics.drawString (i.e.,
lightweight components properly printing their names) should work for FCS.
===================================================
printing problems related to 2D are fixed.  There is still a problem with
the positioning of text labels on buttons, which is being referred back to AWT

paul.charlton@eng 1998-09-21

Comments
EVALUATION fixed offset of StretchBlt, fix black pixels returned by buggy BitBlt on some printer devices. paul.charlton@eng 1998-09-21 The incorrect positioning of text in peered components has exited for sometime, in both 1.2 and 1.1. Since that specific problem is not a regression, we can wait to fix that. Running the regression test on the latest 2D build (24-Sep-98), I see that Graphics.drawString now appears to be working correctly, but a new problem has appeared: the background of the lightweight components is not being filled in at all. Instead, about half of the border is drawn as a dashed line. This problem will substantially affect the printing of Swing and other lightweight Components. I have attached a postscript file to this BugId which clearly illustrates the problem on page 1. Reassigning back to classes_2D. david.mendenhall@eng 1998-09-24 The dashed border is actually a colored border drawn with a halftoning screen to approximate the color on a monochrome printer or output device. The reason that only the border is being colored is that the fill of the background is being obliterated by a later rendering. If you look at the statements following the fill of the border there is a PostScript imaging operation which is what is drawing the text (if you comment it out, the text disappears and the bg is filled again). This appears to be a case where we are using the GDI getImage/putImage pipeline to draw the text. Needless to say, you can't retrieve pixels from a printer. I'm reassigning this to Paul who may know of a way for us to avoid the GDI image pipelines for rendering text to printers... jim.graham@Eng 1998-09-29 driver dependency ... most rasterizing printer drivers on Win32 do not have this limitation. Spooling drivers may have this limitation. Will need an implementation where text can be sent as a transparent-background image. paul.charlton@eng 1998-09-30 In JDK 1.2.2 the test against which this bug was filed now prints fine. Various bug fixes contributed to this, so closing as "not reproducible in 1.2.2" ===============================
11-06-2004

PUBLIC COMMENTS fixed offset of StretchBlt, fix black pixels returned by buggy BitBlt on some printer devices. paul.charlton@eng 1998-09-21 ============================= In JDK 1.2.2 the test against which this bug was filed now prints fine. Various bug fixes contributed to this, so closing as "not reproducible in 1.2.2" ===============================
10-06-2004

WORK AROUND use a non-postscript printer driver paul.charlton@eng 1998-09-30
30-09-1998