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

Weird printing problems

P: n/a
I have a generic page that I use for printing content, and it contains
an iframe into which I put the url for the page to be printed. I
dynamically size the iframe so that it correctly displays the entire
contents of the printed page.

There are 2 problems with this:
1) The resulting printout chops off the bottom part of the page, even
though it displays the full page in the browser. Even in print preview
it still chops off the bottom. I wonder if dynamically sizing the
iframe throws off the browser's printing information.
2) Sometimes the browser doesn't resize the iframe correctly. The
iframe returns the wrong scrollHeight.

Here's the code I use to resize the iframe:
var h = document.frames("printframe").document.body.scroll Height; = h;

Here's the code to print:
print(); // FYI, I tried document.all.printframe.print();
// but that errors out (object doesn't support this...).

Any ideas?

Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.