Example #1
0
        public static void PrintRtfText(IWin32Window owner, string rtf)
        {
            using RichTextBox box = new RichTextBox()
                  {
                      Visible = false
                  };
            box.CreateControl();
            box.Rtf = rtf;

            Printing.PrintControl(owner, box);
        }
Example #2
0
        public static void PrintText(IWin32Window owner, string text)
        {
            using RichTextBox box = new RichTextBox()
                  {
                      Visible = false
                  };
            box.CreateControl();
            box.Text = text;

            Printing.PrintControl(owner, box);
        }