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

Print wide page

P: n/a
Hi,

I would like to ask for your help.

I am using IE5.5.

I have a wide page with horizontal scroll bar.
The problem is that I get only 1 page when printing it using
"file->print" or "window.print".

The "print preview.. " displayed also 1 page only (page 1 of 1(

Is it IE problem or something with my printer?

Any JS tricks to bypass this problem?

Example:

try

<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=0 >
<TR>
<TD><NOBR>This is a long text, This is a long text, This is a long
text, This is a long text, This is a long text, This is a long text,
This is a long text, This is a long text, This is a long text, This is
a long text, This is a long text, This is a long text, This is a long
text, This is a long text, This is a long text, This is a long text,
This is a long text, This is a long text, This is a long text, This is
a long text, This is a long text, This is a long text, This is a long
text, This is a long text, This is a long text, This is a long text,
This is a long text, This is a long text, This is a long text, This is
a long text, This is a long text, This is a long text,
</td></tr>
</table>

Thanks,

Yaron
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
VK
Actually what behavior do you want from your browser? You created a very
wide table and you told to browser (and printer) that it not allowed to
shrink the cells. There are not printers yet capable to stretch the
paper on runtime. So your printer prints each line until the right
margin limit, and the rest is being truncated. It's totally normal
behavior, not a bug.

Converting screen pixels to paper inches seems like converting gallons
to miles, but still there are some good approximations for it. At the
very first approximation, with a 1024x768 screen and portrait paper
orientation, your printable area is about 700 pixels (+- 50 pixels
depending on screen aperture and some printer settings). It means that
if you put the page content in a fixed width table, the first 700 pixels
from the left will be printed, and the rest will be truncated (I'm sure
you had a number of such printouts from different web-sites).

Solutions:
1) Re-think your data layout in the standard portrait orientation. I
know, now the landscape seems to you the only solution for your
particular case. Don't trust your feelings, it's an allusion :-)
Everything can be done in more than one way. And remember 700 pixels
limit.

2) Release printer: instead of table use <p> and <br> right on the page.
They will be properly wrapped on printing.

3) Windows provides an interface to change printer settings (switch from
portrait to landscape for example). Interface is on C++, so to access it
from the page you have to write an ActiveX and sign it properly. It
still doesn't solve the problem of really wide pages, where even
landscape will be not enough.

4) For each style sheet and for each particular style you can assign
MEDIA property. So you can have:
<link rel="stylesheet" href="..." media="page"> for displaying
<link rel="stylesheet" href="..." media="print"> for printer
Sounds like a real high-tech stuff, but it violates WYSIWYG principle.

I would still stay with the solution #1
Yaron Cohen <ya****@lyciumnetworks.com> wrote in message
news:1s********************************@4ax.com...
Hi,

I would like to ask for your help.

I am using IE5.5.

I have a wide page with horizontal scroll bar.
The problem is that I get only 1 page when printing it using
"file->print" or "window.print".

The "print preview.. " displayed also 1 page only (page 1 of 1(

Is it IE problem or something with my printer?

Any JS tricks to bypass this problem?

Example:

try

<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=0 >
<TR>
<TD><NOBR>This is a long text, This is a long text, This is a long
text, This is a long text, This is a long text, This is a long text,
This is a long text, This is a long text, This is a long text, This is
a long text, This is a long text, This is a long text, This is a long
text, This is a long text, This is a long text, This is a long text,
This is a long text, This is a long text, This is a long text, This is
a long text, This is a long text, This is a long text, This is a long
text, This is a long text, This is a long text, This is a long text,
This is a long text, This is a long text, This is a long text, This is
a long text, This is a long text, This is a long text,
</td></tr>
</table>

Thanks,

Yaron

Jul 20 '05 #2

P: n/a
Thanks VK,

Yaron
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.