Back to Devexpress

PdfViewer.PageSetupDialogShowing Event

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-6749dd05.md

latest3.0 KB
Original Source

PdfViewer.PageSetupDialogShowing Event

Occurs when displaying the Print dialog in the PDF Viewer.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public event PdfPageSetupDialogShowingEventHandler PageSetupDialogShowing
vb
Public Event PageSetupDialogShowing As PdfPageSetupDialogShowingEventHandler

Event Data

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

PropertyDescription
FormLocationGets or sets the point that specifies the screen coordinates of the form’s upper-left corner.
FormSizeGets or sets the size of the PDF page setup dialog.
FormStartPositionGets or sets the form start position at runtime.
MinimumFormSizeGets the form’s minimum size.
PrinterSettingsProvides 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).

csharp
private void PdfViewer_PageSetupDialogShowing(object sender, PdfPageSetupDialogShowingEventArgs e)
{
    e.PrinterSettings.EnableLegacyPrinting = true;
}
vb
Private Sub PdfViewer_PageSetupDialogShowing(ByVal sender As Object, ByVal e As PdfPageSetupDialogShowingEventArgs)
    e.PrinterSettings.EnableLegacyPrinting = True
  End Sub

See Also

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace