this is my example :
Public Class Form1 Private Sub PrintButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintButton.Click PrintPreviewDialog1.Document = PrintDocument1 PrintPreviewDialog1.ShowDialog() End Sub Private Sub PrintDocument1_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim Rect As New RectangleF Dim PrintFont As New Font("Arial", 10) Dim PrintString As String With PrintDocument1.DefaultPageSettings Rect.Width = .PaperSize.Width - (.Margins.Left + .Margins.Right) Rect.Height = .PaperSize.Height - (.Margins.Top + .Margins.Bottom) Rect.Offset(.Margins.Left, .Margins.Top) End With PrintString = "Hi " & NameTextBox.Text & ". Google Chrome is a web browser released by Google " & _ "which uses the WebKit layout engine and application framework. It was first released as a beta " & _ "version for Microsoft Windows on 2 September 2008, and the public stable release was on " & _ "11 December 2008. The name is derived from the graphical user interface frame, or 'chrome', " & _ "of web browsers. As of 1 November 2009 , Chrome was the fourth most widely used browser, with " & _ "3.6% of worldwide usage share of web browsers.Development versions of Chrome for Linux and " & _ "Mac OS X were released in June 2009." e.Graphics.DrawString(PrintString, PrintFont, Brushes.Black, Rect) End Sub End Class
what should i do to set the text to justify and set spacing to 1.5 for each line for example. i want print out the text just like microsoft word format.