RadRichTextBox Print Error with Header Section in Xaml format

2 posts, 1 answers
  1. Raaj
    Raaj avatar
    4 posts
    Member since:
    May 2006

    Posted 28 Feb 2012 Link to this post

    I get the following when I try to print using a RadRichTextBox control using XAML format with a Header section.
    The app is using Silverlight 5 and Telerik 2011.3.1406.1050 version. 

    In the app we using the ReadOnlyEditor as a Print Preview before the actual printing. The XAML fed to this control is generated by another screen with a RadRichTextBox.
    The is error raised only if there is a Header section and the whole screen turns white. There is no error if there is no Header.
    I have a sample project which can reproduce this error. Is there a way I can upload a rar file?
    Also issue I have heard from my testers that sometime with editing the header section like adding/removing image it raises a Silverlight error. Though I am not able to reproduction it but thought it could be related to the first issue.

     Please let me know if there is any particular setting that I am missing.

    Thank you,

    Microsoft JScript runtime error: Unhandled Error in Silverlight Application 
    Code: 4004    
    Category: ManagedRuntimeError       
    Message: System.NullReferenceException: Object reference not set to an instance of an object.
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
       at MS.Internal.XcpImports.UIElement_UpdateLayout(UIElement element)
       at Telerik.Windows.Documents.UI.DocumentPrintPresenter.UpdateEditorLayout()
       at Telerik.Windows.Documents.UI.DocumentPrintPresenter.pd_PrintPage(Object sender, PrintPageEventArgs e)
       at System.Windows.Printing.PrintDocument.OnPrintPage(Object sender, PrintPageEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)     
  2. Answer
    Iva Toteva
    Iva Toteva avatar
    1319 posts

    Posted 01 Mar 2012 Link to this post

    Hi Raaj,

    There was indeed a bug with the native printing when the document contains headers or footers.

    We have fixed this issue in the latest 2012 Q1 release - 2012.1.215, so if you upgrade, the problem should be solved. With the version you are using, the only workaround to prevent the crash of the application would be to remove the headers and footers from the document. There is no way to print the headers and footers though.

    All the best,
    Iva Toteva
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top