473,388 Members | 922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Print wide page

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
2 8327
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
Thanks VK,

Yaron
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Wes Groleau | last post by:
Is there a good how-to and/or example of a simple way to have a web page look decent on both screen (in most browsers) and in print? The example in the W3C CSS manual does NOT do it. -- Wes...
2
by: Luis Serrano | last post by:
Hi all, I'm trying to generate labels to print in several different formats, all of them with their own height,width and page margins. We've got this done in MS Access 2000, using a designed...
4
by: Fred | last post by:
I'm a newbie to JavaScript so be gentle. You know that funky IE margin issue that causes the right side of the page to get cut off when the user prints the html document?...
1
by: iwongu | last post by:
Hi, I have a question about std::wcout and its underlying C functions. According to C99, a stream have an orientation type that is one of byte-oriented or wide-one, and it is determined by the...
31
by: melinama | last post by:
Hello, I've looked through alt.html and this group for an answer to my question. However, I found only cranky arguments with, occasionally, bits of hard-to-understand code - out of context -...
6
by: Greg Esres | last post by:
I have some text lines to print that are much longer than the width of the paper, maybe as much as 6 times. For a given page, I'd like everything that doesn't fit to print on a second page, and...
9
by: xprotocol | last post by:
Trying to print a web page that scrolls to right a bit. I would think IE would page break by default when it gets to the end of the sheet, but it doesn't, it just cuts off the print. This only...
6
tdw
by: tdw | last post by:
the View Orders form in my Access database has a Print button on it. It has other buttons too, like Edit etc. These buttons used to be at the bottom of the form laid out horizontally, but this was...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.