Home Forums WinForms controls Xceed Grid for WinForms report printpreview maximized Reply To: report printpreview maximized

User (Old forums)
Post count: 23064

There is no way to set the PrintDialog size using the PrintPreview method. However, PrintPreview is only a shortcut. You could do the whole process yourself. Here’s an example in C#. It assumes that you have a PrinterSettings instance.

using( PrintDocument document = this.CreatePrintDocument() )
// Bypass the built-in progression dialog
document.PrintController = new StandardPrintController();
document.PrinterSettings = ( PrinterSettings )printerSettings.Clone();
document.DefaultPageSettings = ( PageSettings )printerSettings.DefaultPageSettings.Clone();

using( System.Windows.Forms.PrintPreviewDialog printPrvDlg = new System.Windows.Forms.PrintPreviewDialog() )
printPrvDlg.Document = document;
printPrvDlg.WindowState = System.Windows.Forms.FormWindowState.Maximized;

Imported from legacy forums. Posted by André (had 230 views)