View Full Version : Print friendly page

07-12-2002, 05:08 PM
Is there any way to make a second (layer) page that will print out when someone presses print?

since my main page has a lot of graffics.

07-12-2002, 05:18 PM
there's no way to just print a layer (as far as I know)

why not just make a separate page for text-only (or a very scaled down version) and just send the user there to print?


07-12-2002, 05:21 PM
never thought of that. honestly, that's why i didn't make it, but now, *shrug* no excuse, huh?

Thanks a lot.

Roy Sinclair
07-12-2002, 05:52 PM
Use media specific style sheets instead. With a media specific style sheet you can hide things that aren't appropriate for printing while only having to maintain a single page.


<style type="text/css">
@media print
.displayOnly { display: none ; }


<img id="nottoprint" ... class="displayOnly" />


07-12-2002, 06:49 PM
Be aware that you'll get into cross-browser issues using specific print medai CSS options.

You could also use a serverside script (I've done them in PERL, PHP and ASP, it isn't difficult) that opens the requested file and RegEx removes blocks of text you define (usually with beginning and ending comments), so the script parses them out and you end up with a printer friendly page unbound by the constraints of your site's layout (at least, as much as you want the layout to disapear).