File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes window print problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window print problem" Watch "window print problem" New topic

window print problem

Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
Hi All,

A new window is displayed from a website(javascript:launchwin()) which contains some text and JPEG image below the text. Am trying to print this window. I use the window.print() option in the onClick prperty of the Print button, as shown in the code below.

The image is not printed in a few attempts, what could be the reason for the same??? Is there any other option for printing the contents of the window.

Thanks in advance,
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
Only thing I can think is you are showing the image as a background. The image will not print if it is a background since it is a setting. If that is not the case then I am not sure.

Mahesh Mamani
Ranch Hand

Joined: Jun 25, 2001
Posts: 110
Here is code for the image part in the BODY tag of the HTML:

Can you please suggest now?

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33098

Given that HTML, it should print. Go through the browser options. (I don't recall the name of the option in IE, but there is one for printing images.)

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: window print problem
jQuery in Action, 3rd edition