The printing works fine, except for the fact that it cuts off my text that did not fit into the page. eg.
TEXT:
abababababababbabababa
PAGE:
-----------------|
PAGE |
|
All that will be printed is this:
abababababababb
How do I set it to automatically "wordwrap" or something to the size of the page that will be printed?
I'm using this code to print my text:
.net Code:
Sub PrintPreview() Dim Print_Preview As New PrintPreviewDialog Print_Preview.Document = PreparePrintDocument() Print_Preview.WindowState = FormWindowState.Maximized Print_Preview.ShowDialog() End Sub Private Function PreparePrintDocument() As PrintDocument Dim Print_Document As New PrintDocument AddHandler Print_Document.PrintPage, AddressOf Print_PrintPage Return Print_Document End Function Private Sub Print_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Dim Page As String Page = Me.rt.Text e.Graphics.DrawString(Page, rt.Font, Brushes.Black, 50, 50) e.HasMorePages = False End Sub




Reply With Quote
