Creating a Print Link:The following code lets the user click on a link <A HREF=""> to print the page. This is useful and doesn't take up much "Real Estate" on the page. Because it is a link, it may be overlooked, however, as the Print function is not normally associated with a link.
Print This Page |
Creating a Print Button:The clearest way to provide a print control, is to provide a button with a clear label on it "Print This Page". This button could be part of a FORM, but in the case below, it is simple an input control, with the type set to "Button". Netscape doesn't like input buttons all by themselves, so to make Netscape happy, you could nest the <INPUT> inside a <FORM></FORM> tag. There is no need to set a NAME, METHOD, or ACTION for the <FORM> tag. Just the existance of the tag will make Netscape happy.
|
Setting up a Page Break:If you actually printed this page, you'll notice that the printed page doesn't look as good as the webpage To do this, you need to take charge of where the page breaks. By using the paragraph tab <P>, and adding a STYLE, we can set up a hard page break. To set up LABELS, (I haven't tried this), you'd probably have to set up a series of table cells, each EXACTLY the size of one label. You'd have to text it quite a bit, and perhaps limit it to one page of labels at a time. But anything that can be seen, can be printed. Here is the code to set up page breaks on the printed page. Page breaks have no effect in the browser. They only effect the way the page prints.
<p STYLE="page-break-before: always">
Click on this example to load a new page specially formatted for printing. |