By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,570 Members | 1,724 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,570 IT Pros & Developers. It's quick & easy.

window.print() issue

P: 2
Hi there,

I have an issue where I have to print a form that is actually a picture (.jpg) and that picture sits inside an iframe. I have a simple java script in there to print the page and for all of my forms that are less than one page, it prints fine. The form fills out the entire page. However, when my .jpg is longer than one page, it simply prints out the first page, then doesnt print the rest. Is there a way to use java, or some other language to print the entire image on multiple pages? One page will just not do the trick. Thanks for any replies
Dec 11 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 2.5K+
P: 3,112
This is a JavaScript Question, not a Java Question, so I've moved it to the JavaScript area.

Nepomuk (Moderator)
Dec 11 '08 #2

P: 2

This is a repost due to misplaced thread. I have an iframe with a .jpg picture in it. The picture itself is 768 x 1790 pixels (width, height). I used a simple bit of javascript I found on the net to print out the window.

<input type="button" value="Print this page" onClick="window.print()">

However, this does not work out well for me because My pictures go off the bottom of the page, and dont continue onto the next page. It just prints one.... plus a blank one at the top, bottom or sometimes both. What I idealy need is some help with code to print out not only one page of this picture but also whatever is left. I also would really like it if I could eliminate the blank pages above and below.

Is there anybody who can help me out?

Thanks in advance
Dec 11 '08 #3

Expert Mod 15k+
P: 16,027
This can't be done with JavaScript. JavaScript only allows the window.print() method. Either look into Print Stylesheets, or a browser-specific solution, e.g. an ActiveX control for IE.
Dec 12 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.