This is a migrated thread and some comments may be shown as answers.

HTML Print and lose formatting

1 Answer 98 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Edward
Top achievements
Rank 1
Edward asked on 16 May 2012, 01:29 PM
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

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 21 May 2012, 02:33 PM
Hello Edward,

Unfortunately, we were not able to reproduce the problem you have described.

In our latest official version  - 2012 Q1 SP1 (2012.1.326) Html and Native print seem to work as expected. Could you please confirm that you are using this version in your project? For testing purposes I have used single paragraph line spacing and I have executed your steps, but the printed document looked correct. Could you elaborate more on your issues with Html print and the exception thrown by Native print? We will appreciate if you can send us sample project using a support ticket, so we can further investigate these failures.

Looking forward to your reply.

Regards,
Vasil
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Edward
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or