Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Maximum Printable Width?

Posted on 2001-08-27
7
Medium Priority
?
719 Views
Last Modified: 2013-12-25
My site uses a table to set the width to 770 so that 600x800 screen resolution users can see the entire width without scrolling horizontally.

My question is, how wide may my table be without risking being cutoff when printed?

Is it best to use a variable width table for this purpose?

Thanks.
0
Comment
Question by:awalters
7 Comments
 
LVL 10

Accepted Solution

by:
dij8 earned 400 total points
ID: 6428327
You can not garuantee anything when printing so there is no safe maximum.  You don't know the users printer or printer settings, blah blah blah...  The list goes on why this isn't possible.

With that said, you want to aim for 550 pixels wide for an A4/Letter printer.
0
 
LVL 15

Expert Comment

by:Eric AKA Netminder
ID: 6428718
You might also consider converting the table into a printable document, like a PDF file or a Word Doc file, and allowing the user to download it, rather than having them print your HTML page which, as dij8 has noted, is perilous.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6432495
Here is a good link to get size, http://hotwired.lycos.com/webmonkey/99/41/index3a_page3.html?tw=design

I ran a simple test, put this in a .aps page;

<%
i = 0
a = 0
For a = 1 To 10
     For i = 0 To 9
          Response.Write i
     Next
Next
%>

Now hit print.  I returned 94 lines of data to my printer.  This is without a single style sheet property and default printer specs.  Again, the client printer setting will come into play.

You can play with CSS to properly format a printed page like this;

<STYLE MEDIA="PRINT">
td {  font-family: Arial, Helvetica, sans-serif;
font-size: 8pt;
color: #000000
}
</STYLE>

This will set everything inside a <td> tag to the properties listed when the browser sends a print command, and if you combbine this with the column width's specified in the link I posted you can get a properly formatted printable table.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Expert Comment

by:mgfranz
ID: 6432575
And, if your site is destined to be printed on a standard laser printer, a width of 520 pixels will ensure that it'll fit on a letter-sized piece of paper. Use a 600-pixel width if you're primarily concerned that everything on the page should be visible at once on a 640-by-480 or wider monitor.  And sometimes you might want to design a page that's 750 pixels wide so that the full width of the page will be visible for most of your audience (800 pixels wide and up), but still useful for smaller displays.

But, I have done this in the past, when someone wants to print a page, I use the FileSystemObject in IIS to create a new page from the displayed page with a table width of only 520 pixels and then use Style Sheet properties to control font and such then output that to a window.print command, or if in an intranet scenario use WSH to print to a predetermined printer.
0
 

Author Comment

by:awalters
ID: 6435266
Unfortunately, there appears to be no straightforward answer to this problem.

Thanks to all of you for your comments.
0
 
LVL 10

Expert Comment

by:dij8
ID: 6435816
It's not that there is no easy answer.  It's that the web is not print media.  If you want to print something as close to the same as what is viewed then you need to look at a more printer friendly formet than HTML.  The only real suggestion is PDF.  And even with this you can get problems.  Not the least of which is the inability to dynamically genearate pages and the huge size of these pages when they are generated.

But like I said, stay under 550 pixels wide and you should be safe for printing.  But that doesn't look as good on the screen because you will have a lot of white space then.

Glad to help as much as I did of course.  And thanks for the A.
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6436313
One other note, a printer is going to print what is displayed on the browser window, if you build a page with a table set to 100% width, the page will only fill up the maximum window width and the printer will then print that.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question