Print Silently Documents with RadRichTextEditor
Environment
Product Version | Product | Author |
---|---|---|
2021.1.223 | RadRichTextEditor for WinForms | Desislava Yordanova |
Description
This tutorial demonstrates how to print silently different document types, e.g. .docx, .html, etc.
The required Assembly References are:
- System.Windows.Forms (for Console applications)
- Telerik.WinControls
- Telerik.WinControls.RichTextEditor
- Telerik.WinControls.UI
- TelerikCommon
Solution
RadRichTextEditor supports importing the content of different document types like DOCX, XAML, HTML, RTF, Plain text. To import a document you have to use a specific class that implements the IDocumentFormatProvider. The supported document providers in RadRichTextEditor are listed here. Once a document is imported in RadRichTextEditor, you can use its printing functionality.
Silent Printing of Word and HTML documents
The above approach can be followed with the rest of the document providers that RadRichTextEditor offers.