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

Printing problems

4 Answers 66 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Auvo
Top achievements
Rank 1
Auvo asked on 25 Oct 2011, 02:12 PM
Hi,

I have problems to use print-method in RadRichTextBox control. E.g when I dynamically load RadRichTextBox to the visual tree and then set the document. This throws an null exception when I call the Print-method.

RadRichTextBox textBox = new RadRichTextBox();
grid.Children.Add(textBox);
textBox.ApplyTemplate();
textBox.UpdateEditorLayout();
textBox.Document = this.CreateDocument();
textBox.Print("MyDoc", PrintMode.Native);  // It crash in here!

CreateDocument returns a valid document, I have tested it by loading it to radRichtextbox without printing.

Hopefully you can see directly what is wrong in my code... if you can provide sample project, that would also help.

 I'm using WPF version of Telerik controls (ver. 2011.2.712.40)

Regards,
Auvo



4 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 26 Oct 2011, 08:42 AM
Hello Auvo,

Unfortunately there was a bug with native printing, which was introduced at a very late stage of development and passed in the final release build for the Q2 official release (2011.2.712). 
The good news is that we fixed it immediately in a subsequent internal build. If you upgrade to the Q2 SP1 (2011.2.920) or the recently released Q3 Beta (2011.3.1020), the issue will no longer be present.

All the best,
Iva Toteva
the Telerik team

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

0
Auvo
Top achievements
Rank 1
answered on 26 Oct 2011, 08:48 AM
Great! I'll download the SP1 and try that

Thank's,
Auvo
0
Avrohom Yisroel
Top achievements
Rank 1
answered on 29 Feb 2012, 04:20 PM
Hello,

I'm using the full Q3 release 2011.3.1220.1040, and am still getting the same exception when I call..

rtb.Print(PrintMode.Native);

How do I call the print method?
0
Iva Toteva
Telerik team
answered on 01 Mar 2012, 12:41 PM

Hi Avrohom,

The bug reported in this forum has been fixed in the 2011 Q3 SP1 version you have quoted as the one you use.

There is a problem with the 2011 Q3 SP1 (2011.3.1220) only in Silverlight, when there are headers and footers in the document. Both issues are not present with the latest 2012 Q1.

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 >>
Tags
RichTextBox
Asked by
Auvo
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Auvo
Top achievements
Rank 1
Avrohom Yisroel
Top achievements
Rank 1
Share this question
or