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

Print RadDocument without RadRichTextEditor

4 Answers 56 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 05 Jun 2018, 05:15 PM

Hello,

I am trying to programmatically create RadDocuments and while I am successful in this regard I am looking for a way to use RadPrintPreviewDialog to render the document rather than having to instantiate a control like RadRichTextEditor when I don't need it (the end-user chooses what to print from a list and I handle the generation completely, only showing a print preview to them). I haven't even found a way to translate a RadDocument to a RadPrintDocument. The only thing I found so far is this post:

https://www.telerik.com/forums/printing-a-raddocument-without-assigning-to-a-radrichtextbox

In that post from 2010 there was not yet an option to do this. Has this changed? If not shall I put in a feature request?

Thanks,

Matt.

4 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Jun 2018, 10:55 AM
Hello, Matt,  

RadDocument and RadPrintDocument are completely different documents by their internal structure. It is impossible to convert them. The recommended approach in this case is to use the built-in API for printing that RadRichTextEditor offers. Additional information is available in the following help article: https://docs.telerik.com/devtools/winforms/richtexteditor/printing

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Matt
Top achievements
Rank 1
answered on 06 Jun 2018, 01:50 PM

Interesting. So with all of the features Telerik has to open and convert different document formats, there is no facility to directly render a RadDocument to a printer?

The reason I ask is it seems odd to have to load up a control that I don't need to print something entirely done in code. I also have to attach it to a form before printing works as I found out (I was creating the editor in code). I will submit a feature request for rendering to a printer and see what happens.

Thanks,

Matt

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Jun 2018, 11:51 AM
Hello, Matt,  

Each control that provides printing functionality has its own printing implementation. That is why the RadPrintDocument needs to specify the AssociatedObject to the respective control in order to print the content accordingly. Hence, the printing logic is deeply located in the respective control, not the RadPrintDocument actually. Hence, you need to use silently the RadRichTextEditor in order to print the loaded document. 

As to the logged feature request, we will review it in the feedback portal and consider whether such an implementation is possible.

I hope this information helps. If you have any additional questions, please let me know. 

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Matt
Top achievements
Rank 1
answered on 07 Jun 2018, 01:27 PM

Gotcha. Well, all I can do is request a feature and see how it goes.

Thanks,

Matt

Tags
RichTextEditor
Asked by
Matt
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Matt
Top achievements
Rank 1
Share this question
or