Print RadDocument without RadRichTextEditor

5 posts, 0 answers
  1. Matt
    Matt avatar
    13 posts
    Member since:
    Mar 2018

    Posted 05 Jun 2018 Link to this post

    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.

  2. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3466 posts

    Posted 06 Jun 2018 Link to this post

    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.
  3. Matt
    Matt avatar
    13 posts
    Member since:
    Mar 2018

    Posted 06 Jun 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    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

  4. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3466 posts

    Posted 07 Jun 2018 Link to this post

    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.
  5. Matt
    Matt avatar
    13 posts
    Member since:
    Mar 2018

    Posted 07 Jun 2018 in reply to Dess | Tech Support Engineer, Sr. Link to this post

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

    Thanks,

    Matt

Back to Top