6 jun
2017

Richtextbox not showing some texts after margin-left applied for printing in C# and making a line fr

I am quite new in C#. I have to print the paragraph inside the richtextbox but the problem is that when i apply the margin-left then margin is starting work but the text disappearing from right side. when i See in print preview the complete text has become only one line. The texts consists of many line which may exceed to three pages. so, what is the best way to do it. I have tried many tips from may tutorial but failed. Please, it is requested for help.

    private void printDocument1_PrintPage(object sender, PrintPageEventArgs e)
       {

           e.Graphics.DrawString(order_text.Text, new Font("Arial", 12, FontStyle.Regular), Brushes.Blue, new Point(50, 160));
          }

        private void preview_os_Click(object sender, EventArgs e)
          {
             printPreviewDialog1.Document = printDocument1;
            printPreviewDialog1.ShowDialog();
           }

enter image description here

COMENTARIOS

DEJA TU COMENTARIO

© 2017 website by Rubit Corporation