Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Making a 'printer friendly' page - margins?

Making a 'printer friendly' page - margins?
Thread Tools
Junior Member
Join Date: May 2003
Location: Sydney, Australia
Status: Offline
Reply With Quote
Aug 26, 2003, 11:37 PM
 
Hello,

I am making a website, and need to make a printer friendly page for many articles on this site.

The printer friendly page however, is meant to have a long graphic placed across the bottom of the page, because this is what the normal printouts from this company look like.

I have two questions:

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)

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)

Anyone do printer friendly stuff before, that needed fairly precise controls on how the printout looks? Please help!! (any advice at all is welcome)
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Aug 26, 2003, 11:47 PM
 
this won't be much help, but CSS standard allows for a seperate CSS document to define what styles to use in printing situations. Check it out on w3.org. I have no experience with these seperate stylesheets or i'd help you out more. good luck
Travis Sanderson
     
Mac Elite
Join Date: May 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Aug 28, 2003, 06:37 PM
 
Sorry mate, I don't have any advice - but normally the guys in here are good at answering anything, wonder why none of them know about this one? Seems a simple enough request.
     
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Aug 28, 2003, 09:48 PM
 
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.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:20 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2