A library to help to print the contents of a RichTextBox control.
using VPKSoft.WinFormsRtfPrint;
namespace TestApp
{
public partial class FormMain : Form
{
private void mnuPrint_Click(object sender, EventArgs e)
{
rtbPrintTest.PrintWithDialog();
}
}
}
OR
Use the static method overloads of the RtfPrint class:
using VPKSoft.WinFormsRtfPrint;
namespace TestApp
{
public partial class FormMain : Form
{
private void mnuPrint_Click(object sender, EventArgs e)
{
RtfPrint.RichTextBox = rtbPrintTest;
RtfPrint.PrintRichTextContents();
}
}
}
- P/Invoke is used. 🙄
This library is based on the Microsoft article Getting WYSIWYG Print Results from a .NET RichTextBox by Martin Müller.
- JetBrains for their open source license(s).