...

View Full Version : Print friendly page



Trusten
07-12-2002, 04: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.

QuackHead
07-12-2002, 04: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?

~Quack

Trusten
07-12-2002, 04: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, 04: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 ; }
}
</style>

...

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

...

Feyd
07-12-2002, 05: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).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum