this is what i have now:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim prn As New Printing.PrintDocument
' Select the PDF Printer
' prn.PrinterSettings.PrinterName = "pdf995"
' Handle the page events
AddHandler prn.PrintPage, AddressOf Me.PrintPageHandler
' Do the print (Printing handled by the print page handler)
prn.Print()
' Remove the page handler
RemoveHandler prn.PrintPage, AddressOf Me.PrintPageHandler
End Sub
Private Sub PrintPageHandler(ByVal sender As Object, ByVal args As Printing.PrintPageEventArgs)
Static i As Integer = 0
i = i + 1
' Print a line on this page
' Create string to draw.
Dim drawString As [String] = "Sample Text"
' Create font and ...
Go to the complete details ...