PDA

View Full Version : Setting Print Parameters


stoneygossard
06-09-2006, 04:13 PM
Hi,

I want to put a "Print" button on a page but I don't want it to print the full page - I just want to print a table on the page so is there anything in DW8 that will allow me to do this i.e. to set the print area for me.

Thanks
Stone

domedia
06-09-2006, 07:20 PM
If your website is made with web stabndards (structure in html and style in CSS) you can specify a print stylesheet. You use 'media="print"' in your css link to let the browser know it's for printing, and then in your print stylesheet, simeply 'display: none' for elements you don't want printed, or even change the whole layout for print :)

Read Eric Meyers article from ALA for more info, 4 years old, but still authority on the subject:
http://www.alistapart.com/stories/goingtoprint/

If you're not using html/css for your page, you need to use the pre-2000 techique of actually creating a seperate page for print and somehow link to it from a javascript. ;)

stoneygossard
06-21-2006, 05:54 PM
Ok,

I'm a programmer and am concentrating on the programming end of the application. I didn't use CSS in this site so need to use the pre-2000 method you described in your answer to me using javascript.

I can make a "Print Version" link on the page which brings the user to a printfriendly page but the data required for print is taken from a database and is therefore dynamic. So how do I set out this "printfriendly" page?

Any suggestions? I know i'm the programmer but not fairly new to the web programming side of things.

This link will bring u to the specific page i'm referring to:

Code:

http://tramoregaa.waterfordcomputerservices.com

Thanks


Stoney

domedia
06-24-2006, 02:23 PM
You actually have to create a seperate page for printing only (for all the pages you want to be print friendly) and add a javascript 'print' button on it.

This is very time consuming, if you jusmp on the stabndards bandwagon now, it will save you tons of headaches in the future.