Print Preview Control settings not working

4 posts, 0 answers
  1. Steve
    Steve avatar
    20 posts
    Member since:
    Jan 2011

    Posted 17 May 2016 Link to this post

    Hello,

     

    I'm using the PrintPreviewControl from the Telerik.Windows.Controls.Spreadsheet.Controls assembly in Silverlight.

    However, the Print Settings, specifically the page orientation setting, does not seem to have any affect, with the setting from the browser's print dialog taking precedence instead.

    Do I need to do something to handle this setting myself? Alternatively, is there a way to customise the PrintPreviewControl in order to hide some elements?

     

    Thanks

  2. Petya
    Admin
    Petya avatar
    983 posts

    Posted 19 May 2016 Link to this post

    Hi Steve,

    The printing settings RadSpreadsheet exposes control the way the visual which is sent to the printer will look. For example, if you set the page size to A3, the range of cells included in this visual will be larger. In Silverlight, there's no way to access the actual printer settings due to security limitations of the framework and indeed, the settings of the PrintDialog take precedence. In other words, to print to A3 paper (or with Landscape orientation), you need to specify this both for RadSpreadsheet in the print preview control and for the printer in the PrintDialog.

    As to your question on modifying the preview control, you can extract and change the style of the PrintPreviewControl and remove any options you don't want to be visible. The attached application demonstrates how this can be achieved - it uses the Windows8 theme and our implicit theming mechanism.

    I hope this helps.

    Regards,
    Petya
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. John Tobin
    John Tobin avatar
    17 posts
    Member since:
    Mar 2008

    Posted 15 Aug in reply to Petya Link to this post

    Hi,

    I have the exact same problem but I am using WPF and not silverlight? Is this a problem for WPF too? I assumed it would be OK in WPF since it is possible with WPF to access the printer settings. Do you know why this would not work for me?

    Thanks

  4. Anna
    Admin
    Anna avatar
    113 posts

    Posted 18 Aug Link to this post

    Hi,

    Your assumption is correct, there is indeed no reason why this scenario would not be working for you in WPF. Could you please share your code with us to help us investigate further?

    Looking forward to hearing from you.

    Regards,
    Anna
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top