This question is locked. New answers and comments are not allowed.
I am trying to use HTML print and have lots of problem. I stored my data in HTML if that matters.
For example, empty paragraph break is missing. I am using single line spacing, so if I press enter it will look exactly like shift enter. However if I do:
Line 1 (enter, enter)
Line 2
but the print out will only show
Line 1
Line 2
I think this has to do empty paragraph <p> tag is ignored by IE in the HTML print. By comparison, this will work:
Line 1 (shift enter, shift enter)
Line 2 (enter, space)
Line 3
I also tried to use native printing, and get this:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Wed, 16 May 2012 12:31:34 UTC
Message: 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 System.Windows.UIElement.UpdateLayout()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.UpdateEditorLayout()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.DoOnDocumentChanged()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnOwnerChanged()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.set_Owner(RadRichTextBox value)
at Telerik.Windows.Controls.RadRichTextBox.InitActiveEditorPresenter()
at Telerik.Windows.Controls.RadRichTextBox.set_ActiveEditorPresenter(IDocumentEditorPresenter value)
at Telerik.Windows.Controls.RadRichTextBox.<>c__DisplayClass22.<Print>b__20(Object o, EventArgs e)
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnPrintingStarted()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.pd_BeginPrint(Object sender, BeginPrintEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Line: 56
Char: 13
Code: 0
URI: http://localhost:7629/Login.aspx
For example, empty paragraph break is missing. I am using single line spacing, so if I press enter it will look exactly like shift enter. However if I do:
Line 1 (enter, enter)
Line 2
but the print out will only show
Line 1
Line 2
I think this has to do empty paragraph <p> tag is ignored by IE in the HTML print. By comparison, this will work:
Line 1 (shift enter, shift enter)
Line 2 (enter, space)
Line 3
I also tried to use native printing, and get this:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDS; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Wed, 16 May 2012 12:31:34 UTC
Message: 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 System.Windows.UIElement.UpdateLayout()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.UpdateEditorLayout()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.DoOnDocumentChanged()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnOwnerChanged()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.set_Owner(RadRichTextBox value)
at Telerik.Windows.Controls.RadRichTextBox.InitActiveEditorPresenter()
at Telerik.Windows.Controls.RadRichTextBox.set_ActiveEditorPresenter(IDocumentEditorPresenter value)
at Telerik.Windows.Controls.RadRichTextBox.<>c__DisplayClass22.<Print>b__20(Object o, EventArgs e)
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnPrintingStarted()
at Telerik.Windows.Documents.UI.DocumentPrintPresenter.pd_BeginPrint(Object sender, BeginPrintEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Line: 56
Char: 13
Code: 0
URI: http://localhost:7629/Login.aspx