Print RTF from Windows Service

2 posts, 1 answers
  1. Todd
    Todd avatar
    5 posts
    Member since:
    Aug 2012

    Posted 18 Sep 2015 Link to this post


    I am using the RichTextEditor control to allow users to create a document (which may include embedded images). The RTF text is then stored in a database, and a Windows Service is supposed to print the document at a later date.The Windows Service does not allow any dialog or form to be shown, so neither a normal print dialog, nor converting to PDF and printing with a PDF Viewer can be used to print.

    My current approach has been to convert the RTF to a PDF with RtfFormatProvider and PdfFormatProvider, save it to a file, and print it using the Print verb. However, no matter what options are given to the Print process, it still tries to start the Adobe PDF Viewer to print.

    Does Telerik offer a way to print RTF documents without any UI? Or perhaps stock WinForms has a way that I am overlooking. 

    I am using version Q3 2014 (2014.3.1104)

    Thank you for any assistance.

  2. Answer
    Stefan avatar
    2891 posts

    Posted 21 Sep 2015 Link to this post

    Hello Todd,

    We do not offer any means to print an RTF document without UI - RadRichTextBox has a Print method overload which allows to do not show the settings dialog, but still a Printing dialog is shown that counts the pages sent to the printer.

    A quick search on the matter shows that there is a way to print in WinForms without UI, but it is rather not recommended and with a lot of drawbacks. Here is an article you might find useful: And one more with some comments:

    I hope that you find this information useful.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top