public static void PrintRtfText(IWin32Window owner, string rtf) { using RichTextBox box = new RichTextBox() { Visible = false }; box.CreateControl(); box.Rtf = rtf; Printing.PrintControl(owner, box); }
public static void PrintText(IWin32Window owner, string text) { using RichTextBox box = new RichTextBox() { Visible = false }; box.CreateControl(); box.Text = text; Printing.PrintControl(owner, box); }