VB.NET - how to set papersize to A4? - Asked By Kleomenis Lampropoulos on 26-Feb-06 09:34 AM

Hello, this is my code

[code]
        'Dim a As New System.Drawing.Printing.PaperSize("A4 (210 x 297 mm)", 827, 1169)
        Dim ps As PageSettings
        ps.Landscape = True
        ps.Margins.Top = 10
        ps.Margins.Bottom = 10
        ps.Margins.Left = 10
        ps.Margins.Right = 10

        PrintDocument1.DefaultPageSettings = ps
[/code]

I want programmatically to set the A4 papersize. Note that i only dragged a printdocument on my form. I don't have a pagesetupdialog because some things must be standard, like the margins (set to 10), landscape and A4 paper.

Can you help me?

Setting paper size - Asked By drammer _ on 26-Feb-06 11:53 PM

[CODE]ps.PaperSize = New System.Drawing.Printing.PaperSize("A4", 210, 297) 'dim. of A4[/CODE]

set paper size to 5 inch X 11 inch - binoy gm replied to drammer _ on 21-Dec-07 11:20 PM

how to set paper size to 5 inch * 11 inch