Jump to content

imprimir VB.NET


Recommended Posts

Hola !

 

Estaba tratando de utilizar la impresora de vb.net, la cual imprime correctamente hacia el lado derecho, lado izquierdo y arriba, pero el margen de abajo, en tamaño carta, deja un espacio de 6 a 5 cm que no los utiliza apesar de que el margen esta seteado casi al mínimo para que lo reconozca

 

y otro punto es que no imprime en buena calidad apesar de que esta seteado en máxima calidad. Aquí dejare el pseudo código

 

desde ya gracias por leer :)

   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.Margins.Bottom = 10
        pf.PrinterSettings.DefaultPageSettings.Margins.Left = 10
        pf.PrinterSettings.DefaultPageSettings.Margins.Right = 10



        Dim margins As New Margins(10, 10, 30, 2)
        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
Edited by ChronoCross
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...