Config Paper Size in VB

chrisli

New member
Joined
Mar 12, 2007
Messages
2
Programming Experience
Beginner
Dear All,

I am writing a vb.net web program. One of the functions need to print out a document to an impact printer with 210mm x 130mm paper size. How could I customize the paper size for the impact printer in VB. So that, if the content of a document is out of the range of the paper size, the printer will ask for a new paper instead of keep printing (treat the paper as A4 size, not a customeized paper size) Thanks.:(

Actually I don't know how I can print out a document in VB.net:(

Chris
 

prosys

Member
Joined
Aug 7, 2008
Messages
13
Programming Experience
Beginner
VB.NET:
Dim prn As New Printing.PrintDocument
        Dim pageSettings As System.Drawing.Printing.PageSettings = New System.Drawing.Printing.PageSettings
        pageSettings.PaperSize = New System.Drawing.Printing.PaperSize("Bill", 400, 600)
        prn.DefaultPageSettings = pageSettings
        'AddHandler prn.PrintPage, AddressOf Me.PrintPageHandler
        prn.Print()
        'RemoveHandler prn.PrintPage, AddressOf Me.PrintPageHandler
        'objReport.PrintToPrinter(1, True, 1, 1)

        objReport.Close()
 
Top Bottom