JDK-4388641 : HP DeskJet 930C prints no images
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.3.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-11-13
  • Updated: 2000-11-21
  • Resolved: 2000-11-21
Related Reports
Duplicate :  
Description

Name: yyT116575			Date: 11/13/2000


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

My HP DeskJet 930C prints no images from a PrinterJob. It does print fonts and
vector graphics without problems however. Other printers (like the DeskJet 850)
print without problems. I do not even get a blank page, I get nothing. I can
see the print job being spooled normally, but it look likes the printer decides
the whole page is blank, so it does not produce a page. When i disable the
drawImage(), the text prints fine.

The problem can be reproduced from the following code :

import java.awt.*;
import java.awt.image.*;
import java.awt.print.*;

public class Print implements Printable
{
    private BufferedImage image;
    
    static public void main(String[] args)
    {
        try {new Print();System.exit(0);} catch (Exception e) {e.printStackTrace
();System.exit(1);}
    }
    
    public Print() throws PrinterException
    {
        image = new BufferedImage(100,100,BufferedImage.TYPE_3BYTE_BGR);
        Graphics2D graphics = image.createGraphics();
        graphics.setPaint(Color.red);
        graphics.fillRect(0,0,100,100);
        graphics.dispose();
        
        PrinterJob job = PrinterJob.getPrinterJob();
        job.pageDialog(job.defaultPage());
        job.printDialog();
        job.setPrintable(this);
        job.print();
        System.out.println("FINISHED");
    }

    public int print(Graphics graphics,PageFormat pageFormat,int pageIndex)
throws PrinterException
    {
        System.out.println("PRINTING");
        if (pageIndex>0) return Printable.NO_SUCH_PAGE;
        graphics.setColor(Color.black);
        graphics.setFont(new Font("Monospace",Font.PLAIN,12));
        graphics.drawString("Hello",120,100);
        graphics.drawImage(image,120,140,null);
        return Printable.PAGE_EXISTS;
    }
}
(Review ID: 112181) 
======================================================================

Comments
WORK AROUND Name: yyT116575 Date: 11/13/2000 none found ======================================================================
11-06-2004

EVALUATION This sounds a lot like one of the symptoms of bug 4258020 which was reported with the same symptoms on a 950c. We've fixed that bug. However all this class of bugs have only been observed on windows 95/98 & in one case win2000. Its never been seen on NT. This bug report states NT in the customer contact field, but nowhere else. I would like to have the exact OS versions confirmed. Marking this bug incomplete pending that info. My guess is its 98 and the contact field is incorrect. phil.race@eng 2000-11-14 ======================== We have obtained the exact configuration of the user NT 4.0 SP5, HP 930c, and printer driver version 4.0.1 We can reproduce the problem in JDK 1.3 as described. However internal builds of 1.3.1 and 1.4 do NOT exhibit the problem. The fix has been traced to the put back of the fix of 4258020 on Sep. 07. So as surmised this is a duplicate of 4258020, although its normally a 9x bug. phil.race@eng 2000-11-21 ========================
21-11-2000