PdfViewer.PageSetupDialogShowing Event

Occurs when displaying the Print dialog in the PDF Viewer.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v20.1.dll

Declaration

public event PdfPageSetupDialogShowingEventHandler PageSetupDialogShowing
Public Event PageSetupDialogShowing As PdfPageSetupDialogShowingEventHandler

Event Data

The PageSetupDialogShowing event's data class is PdfPageSetupDialogShowingEventArgs. The following properties provide information specific to this event:

Property Description
FormLocation Gets or sets the point that specifies the screen coordinates of the form's upper-left corner.
FormSize Gets or sets the size of the PDF page setup dialog.
FormStartPosition Gets or sets the form start position at runtime.
MinimumFormSize Gets the form's minimum size.
PrinterSettings Provides access to the PDF printer settings.

Remarks

The PageSetupDialogShowing event allows you to control the size and location of a Print dialog.

Handle the PageSetupDialogShowing event to access the PdfPrinterSettings object (the PdfPageSetupDialogShowingEventArgs.PrinterSettings property) and toggle legacy printing engine (the EnableLegacyPrinting property).

private void PdfViewer_PageSetupDialogShowing(object sender, PdfPageSetupDialogShowingEventArgs e)
{
    e.PrinterSettings.EnableLegacyPrinting = true;
}
See Also