I am using vb.net application with OleDb database.
In the form there is a richtextbox
I want to print it and here is my code for that.

But it prints all text in the RichTextBox in a single line and it goes beyond the page margins.
It doesn't print the text as it is in the RichTextBox shown in th form.

So what to do?

 Dim font3 As Font = New Drawing.Font("arial", 10, FontStyle.Underline)
 e.Graphics.DrawString(Me.RBC_Seriestxt.Text, font3, Brushes.Black, 170, 660)

This example in the MSDN documention shows how to set the margins when printing a page.