Live Chat Icon For mobile
Live Chat Icon

How can I print my rich text

Platform: WinForms| Category: RichTextBox

There is no direct support for printing rich text in the .NET Framework. To print it, you can use interop with the SendMessage API and these three messages to do your printing.

EM_SETTARGETDEVICE : specify the target device

EM_FORMATRANGE : format part of a rich edit control’s contents for a specific device

EM_DISPLAYBAND : send the output to the device

Here is a link to a MSDN article by Martin Muller that implements this interop solution.
Getting WYSIWYG Print Results from a .NET RichTextBox

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.