• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Odd printing prob in diff IE versions

 
James Childers
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have been asked by a client to investigate a problem they are having with an old (1.1) applet they have. See, it doesn't print on IE5.5 or above. Frustratingly I do not have the source, but the applet seems to be making a simple call to to PrinterJob.print(). When the applet's "Print" button is clicked, it brings up the standard print window (the one showing the options for printing and with the Ok and Cancel buttons at the bottom).
When the user clicks "Ok", the page prints, but not all of it. The applet that is being printed is a Swing applet; the first four textboxes print out fine, but the rest of the document only prints the labels and the box outlines, not their content.
To make it even more interesting, this thing *does* print successfully on versions of IE prior to 5.5. I checked msjava.dll and the version of that file doesn't seem to be a factor.
Suggestions? I'm prompted to suggest they build a separate page that displays the results in HTML, and let the browser/OS handle the printing instead of Java.
- James
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You say you don't have the source but do you have the class file(s)? If so you could use a decompiler like JAD or grind it out yourself with Java's built in Reflection mechanism. From there you could update, debug or fix the code.
From what I understand about IE5.5 & 6 is it is Brother Gate's attempt to separate the browser from the OS to deflect some possible further legal troubles. So the problem probably lies somewhere in the way 5.5 communicates with the OS.
Hope this helps
 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In later versions of IE 5.5 and in IE 6.0 onwards, Microsoft no longer supports Java. Their Majesties claim that "no one actually uses Java". In the earlier versions, they provided a Window-ized version of Java (J++) and got the living daylights sued out of them (and lost) by Sun for meddling with the standard.
So it's quite possible that your "Java" applet isn't even really Java as supported by the Sun standard and that it's an orphan, since Microsoft has picked up their toys and gone home.
If you had source code, you could probably convert the applet. I don't even know if the Java disassembler can decompile J++, and even if it did, much of the legal fighting was because J++ dumped tasks over to Windows native code which would be even messier to deal with.
Probably it's better to switch to HTML or PDF and not rely on the applet for printing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic