Printing

  • Thread starter Thread starter Chris Mattmiller
  • Start date Start date
C

Chris Mattmiller

Does anyone know how to hard code the size of the paper being printed on?
I am printing onto labels.
Here is what I came up with, but I don't know what goes after the equals
sign:
printDoc.DefaultPageSettings.PaperSize = ;

Thanks
Chris
 
You need to use the PageSettings Class:
http://tinyurl.com/2bbrh
Public Sub Printing()
Try
streamToPrint = New StreamReader(filePath)
Try
printFont = New Font("Arial", 10)
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf pd_PrintPage
pd.PrinterSettings.PrinterName = printer
' Set the page orientation to landscape.
pd.DefaultPageSettings.Landscape = True
pd.Print()
Finally
streamToPrint.Close()
End Try
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub


--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
Back
Top