Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfViewer.PageSetupDialogShowing Event

Occurs when displaying the Print dialog in the PDF Viewer.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.dll

NuGet Package: DevExpress.Win.PdfViewer

#Declaration

public event PdfPageSetupDialogShowingEventHandler PageSetupDialogShowing

#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