Please help me on how to set my paper size in c# code. I am using the API printDocument.
Below is my code:
ppvw = new PrintPreviewDialog();
ppvw.Docume
I am using Visual Basic, with this code I can get the form to show it all in printpreview, still print a slitely cut page on the right.
PrintForm1.Form = Me
PrintForm1.PrinterSettings.DefaultPageSettings.Landscape = True
PrintForm1.PrinterSettings.DefaultPageSettings.PaperSize = New Printing.PaperSize("Custom", Me.Height, (Me.Width + 47))
PrintForm1.PrinterSettings.DefaultPageSettings.Margins = New Printing.Margins(3, 3, 3, 3)
PrintForm1.PrinterSettings.DefaultPageSettings.PaperSize.RawKind = Printing.PaperKind.A4Small
PrintForm1.PrintAction = Printing.PrintAction.PrintToPreview 'PrintForm1.PrintAction = Printing.PrintAction.PrintToPrinter
PrintForm1.Print() 'PrintForm1.Print(Me, PowerPacks.Printing.PrintForm.PrintOption.Scrollable) '