VS2010 Printing problem

456mb

New member
Joined
Oct 1, 2015
Messages
1
Programming Experience
Beginner
hi i tried print in a paper type letter, but the program only use a part, not the full size of the paper

the line blue is the actual printing size, the line red is the ideal printing
20151001_225731.jpg

the actual code :

Code:
    Dim pf As New PrintForm


        pf.Form = Me
        pf.PrinterSettings.DefaultPageSettings.Color = False
        pf.PrinterSettings.DefaultPageSettings.PrinterResolution.Kind = PrinterResolutionKind.High
        pf.PrinterSettings.DefaultPageSettings.Landscape = False
        pf.PrinterSettings.DefaultPageSettings.PaperSize.RawKind = System.Drawing.Printing.PaperKind.Letter


        pf.PrinterSettings.DefaultPageSettings.Margins.Top = 30
        ' pf.PrinterSettings.DefaultPageSettings.Color = False


        pf.PrinterSettings.DefaultPageSettings.Margins.Bottom = 1
        pf.PrinterSettings.DefaultPageSettings.Margins.Left = 10
        pf.PrinterSettings.DefaultPageSettings.Margins.Right = 10






        Dim margins As New Margins(10, 10, 10, 5)
        pf.PrinterSettings.DefaultPageSettings.Margins = margins


        pf.PrintAction = Printing.PrintAction.PrintToPreview


        With pf
            .PrintAction = Printing.PrintAction.PrintToPrinter


            .Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable)
        End With
any idea to fix the impression??

thanks in advance
 
Top Bottom