Home arrow static arrow Java Programming [Archive] - Printing results in fully/partially blank pages
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Printing results in fully/partially blank pages
This topic has 1 reply on 1 page.

Posts:15
Registered: 8/17/00
Printing results in fully/partially blank pages  
Jul 26, 2004 2:55 PM



 
I'm developing a Java application that generates printed output, and am having trouble with pages intermittently being printed partially or completely blank. The pages contain mostly a mixture of text and line graphics, and sometimes bitmap images such as a company logo. Sometimes just a logo is missing from a page, sometimes the whole bottom half of a page is missing, and at other times an entire page is printed blank.

The problem usually occurs with longer multi-page documents, but can also happen with fairly short documents. It doesn't matter if a multi-page report is generated as a single print job, or if each page is generated as a separate job.

The problem varies with workstation/OS/printer combinations. Some combinations always work reliably, while others exhibit the problem frequently. In one case, a workstation running Windows XP exhibits the problem when printing to an HP LaserJet connected locally via either USB or parallel cable, but the same workstation prints fine when a network-attached HP Laserjet is used. However, another workstation running Windows 2000 has problems printing to the same network-attached printer.

My application uses JRE 1.3, and I've tried various maintenance releases as they became available, hoping one of them would solve the problem. I'm currently using JRE 1.3.1_11. I've also tried running my application under the latest JRE 1.4 release, and it worked no better.

I've seen other reports of similar problems over the years, but most of them are old, as are the related bug reports that I've been able to find (which all seem to be closed).

I use RReport to generate the reports I'm trying to print, which is put out by Java4Less (www.java4less.com). The FAQ on their site hints that others have encountered the same problems I am, but their solution is to make sure to use the latest JRE release, which is scary since that doesn't solve the problem. I have the source code to RReport, which I have examined quite thoroughly. While it's not pretty code and has some obvious issues, I can't find anything to suggest that it could cause the kind of problems I'm seeing, especially so inconsistently.

Is it possible that there is some fundamental flaw in the JRE's printing code that has slipped by unconfirmed to this day? Or has the emphasis on J2EE and web apps. allowed this issue to be swept under the rug?

Kevin Rahe
 

Posts:15
Registered: 8/17/00
Re: Printing results in fully/partially blank pages  
Aug 1, 2004 10:09 PM (reply 1 of 1)



 
I did finally find an open bug, # 4527394, that appears to address this issue. I found a solution for the printer that is currently giving me headaches, which is an HP LaserJet 2300d. I turned off the "Enable advanced printing features" setting on the printer's Advanced Properties, and the problem went away. Other applications, such as Adobe Acrobat, are able to print similar documents to the same printer reliably even if "Enable advanced printing features" is enabled, however, so this is really just a workaround, and indicates that Sun's JVM has some fundamental problems in its printing facilities, at least on the Windows platform.

Kevin Rahe
KRAHE InfoSystems, Inc.
 
This topic has 1 reply on 1 page.