More in this section

Forums / General Discussions / "Printer-friendly" control

"Printer-friendly" control

6 posts, 0 answered
  1. F
    F avatar
    34 posts
    Registered:
    15 Mar 2011
    06 Apr 2011
    Link to this post
    Hi,

    I'm trying to find a simple way to code a "Print this page" button.
    Functionally, it would display a version of a given page without tne template, only the content.
    I have two questions about this :

    1 - How do i access to the page content (without template) programmatically?
    2 - Is it too much to create a control for that? Would there be a simpler "client side" way of doing this?

    Thank you,
    F.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    06 Apr 2011
    Link to this post
    Hello F,

    You can try using jquery print plugin.

    http://plugins.jquery.com/project/printElement

    The page is represented and build by controls. Each control is a presentation layer.

    Another option is using WebClient to get byte array and return the current page HTML.

    Regards,
    Ivan Dimitrov
    the Telerik team

  3. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    07 Apr 2011
    Link to this post
    Dear Ivan

    Maybe this could be an idea for a user control

    Drag a 'print this page' widget to the page, specify an img url and/or text) and pick which parts of the page should be printed. This sure would make the live of many of us easy - And sure would be a nice feature to see in Q2.

    If you like the idea PITS-it and we can vote :-)

    Markus
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Apr 2011
    Link to this post
    Hi Markus,

    I logged your feature request and we are going to review it on our next planning meeting. Thanks for your suggestions.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

  5. Ryan Dailey
    Ryan Dailey avatar
    41 posts
    Registered:
    08 Mar 2010
    06 Jul 2011
    Link to this post
    Something I did in 3.7 was create an alternate theme called "Print" and changed over to that theme whenever I used the query string "print".  I did this using a custom page class inheriting from the Sitefinity page class.  However, I can't figure out how to do something similar in this version.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    07 Jul 2011
    Link to this post
    Hello Ryan ,

    In Sitefinity 4.1 SP2 you can add a code behind to each page ( which was not possible in 3.x edition) from page properties. You can create a base class that inherits from System.Web.UI.Page and implement your logic there.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
6 posts, 0 answered