Originally posted by Funny Bugga:
Hello,
I am making a website, and need to make a printer friendly page for many articles on this site.
Why bother? Just make a print stylesheet, and then you can do it with just one page. The most compatible way to do this is to include it as an external stylesheet, and doing your link tag as follows (brackets have been omitted):
link rel="stylesheet" href="blah.css" media="print"
The media="print" line is the important one; it will ensure that it only gets used for printed pages.
1) What is the best height/width in pixels to make my table so it prints nicely on A4? (with as little margins as possible on each side)
The best way is to not use pixels. Browsers seem to be much better at non-pixel measurements in CSS with printers than they are onscreen. Use in or cm instead, whichever fits your system better.
If you must use pixels, then be aware that you will need a separate print stylesheet for Mac and Windows, because browsers scale their pixel measurements for printers (Opera/Mac also scales its pixel measurements onscreen, but that's just their own stupidity). On a Mac, 72px = 1in = 2.54cm.
On Windows, usually 96px = 1in = 2.54cm. However, if the user has Large Fonts enabled, then 120px = 1in = 2.54cm. This is why I urge you not to use pixels, as there is no way to tell whether the user has Large Fonts enabled.
2) Is there any way to make the printout images high res? I thought I would be able to just make them high res, and display on the screen smaller than they really are. But when printing, they still print at the screen res, not the original image res. (PDF isn't an option since these pages change daily)
Here, I'm afraid, you're in trouble. You could use divs instead of images, and make the image the background of the div, specifying the width and height in the CSS. If you did it this way, then you could use a different image in your print stylesheet than you do onscreen. However, I have no clue as to the browser support for this trick (theoretically it
should work, but leave it to IE to make it not work), and it's probably much more trouble than you'd want to go through.
As for PDF not being an option, you should be aware that PHP and some other programming languages have PDF-generation capabilities, so you actually
could theoretically generate PDFs daily. However, since I haven't seen samples of your articles, this may be too difficult to program in your specific case.