How do you design a webpage dimensions so any site visitor can print it on one standard printer page?
I am a 68 year old volunteer trying to build a website for a small nonprofit group. I need to place a standard page of text on a web page in such a way 开发者_开发知识库that any site visitor may print it out on one standard sheet simply by clicking "Print" or the printer icon, while viewing the page.
This is a "Very Difficult Problem", mainly due to the fact there is very little the browser must do from what you tell it to. There are several text-based browsers for instance that will not show any of your pictures or other graphical styling which generally leads to a big list of links for a menu at the top of the page. This would translate to a lot of vertical space on a printed page. Another more common change is that fonts will be changed by the browser to make them larger or smaller, obviously this would affect your layout too.
Your best bet if there is only a single page or a small subset of your website that you are worried about then do these pages as PDF's or something similar. These will guarantee your layout, design, and most of all how many pages your document takes up.
Printing from a web page is extremely difficult. In most recent browsers and from internet explorer 7 has a "shrink to fit page" option which the user has to define when they print.
If you are familiar with CSS, use the CSS print media type.
See http://www.w3.org/TR/CSS2/media.html
I found it best to have a css file just for printing that detects the print media type.
精彩评论