Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Maximum Printable Width?

Posted on 2001-08-27
7
Medium Priority
?
718 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
The viewer will learn how to dynamically set the form action using jQuery.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

688 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