Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jigar 170 posts 233 karma points
    Jul 22, 2009 @ 15:09
    jigar
    0

    Print A Page facilty

    In DNN there is inbuilt facilty for print a page.

     

    Is there anything in umbraco? if not this can be added in wishlist.

     

    Regards,

    Jigar

     

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 22, 2009 @ 15:24
    Peter Dijksterhuis
    0

    You want a print-button on the front-end of the site or in the back-end where pages are edited?

    If in the front-end, this is basic HTML/CSS (or a piece of javascript) which you can add to your templates. Since you control the complete output of the HTML (umbraco spits out nothing when cleanly installed), you're the one that needs to add it to the templates. Remember to create a print-stylesheet and add it to the template as well.

    HTH,

    PeterD

  • dandrayne 1138 posts 2262 karma points
    Jul 22, 2009 @ 15:41
    dandrayne
    2
    <a href="#" onclick="window.print();return false">Print this page</a>

    That's about it, plus a nice print stylesheet (try http://code.google.com/p/hartija/) I use the code below

    /* -------------------------------------------------------------- 

    print.css
    * Gives you some sensible styles for printing pages.
    * See Readme file in this directory for further instructions.

    Some additions you'll want to make, customized to your markup:
    #header, #footer, #navigation { display:none; }

    -------------------------------------------------------------- */

    body {
    line-height: 1.5;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color:#000;
    background: none;
    font-size: 10pt;
    }


    /* Layout
    -------------------------------------------------------------- */

    .page_container {
    background: none;
    }

    hr {
    background:#ccc;
    color:#ccc;
    width:100%;
    height:2px;
    margin:2em 0;
    padding:0;
    border:none;
    }
    hr.space {
    background: #fff;
    color: #fff;
    }


    /* Text
    -------------------------------------------------------------- */

    h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; }
    code { font:.9em "Courier New", Monaco, Courier, monospace; }

    img { float:left; margin:1.5em 1.5em 1.5em 0; }
    a img { border:none; }
    p img.top { margin-top: 0; }

    blockquote {
    margin:1.5em;
    padding:1em;
    font-style:italic;
    font-size:.9em;
    }

    .small { font-size: .9em; }
    .large { font-size: 1.1em; }
    .quiet { color: #999; }
    .hide { display:none; }


    /* Links
    -------------------------------------------------------------- */

    a:link, a:visited {
    background: transparent;
    font-weight:700;
    text-decoration: underline;
    }

    a:link:after, a:visited:after {
    content: " (" attr(href) ") ";
    font-size: 90%;
    }


    /* If you're having trouble printing relative links, uncomment and customize this:
    (note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */

    /* a[href^="/"]:after {
    content: " (http://www.yourdomain.com" attr(href) ") ";
    } */

     

  • Dwayne A 97 posts 117 karma points
    Feb 11, 2011 @ 11:18
    Dwayne A
    0

    @dandrayne. Nice. needed a quick fix on the stylesheet and it does the trick here. I don't have enough karma to contribute yet, but high five on this end.

Please Sign in or register to post replies

Write your reply to:

Draft