Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print friendly page

    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.
    Life is funny, especially when you're poor.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    344
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    never thought of that. honestly, that's why i didn't make it, but now, *shrug* no excuse, huh?

    Thanks a lot.
    Life is funny, especially when you're poor.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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" />

    ...

  • #5
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    404
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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).
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •