Skip to main content
All docs
V24.2

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.ShowPrintPageSetupDialog() Method

Opens the Page Setup dialog.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v24.2.dll

NuGet Package: DevExpress.Win.PdfViewer

#Declaration

public PdfPrinterSettings ShowPrintPageSetupDialog()

#Returns

Type Description
PdfPrinterSettings

An object that contains printer settings selected in the Page Setup dialog.

#Exceptions

Type Description
InvalidOperationException

Occurs if no document is loaded to the PdfViewer instance.

#Remarks

If a user clicks Cancel or closed the Page Setup dialog, the ShowPrintPageSetupDialog method returns null.

The code sample below shows how to obtain printer settings selected in the Page Setup dialog:

using DevExpress.Pdf;
using DevExpress.XtraPdfViewer;
//...
PdfViewerControl control = new PdfViewerControl();
control.AsyncDocumentLoad = false;
control.OpenDocument(path);
PdfPrinterSettings printerSettings = control.ShowPrintPageSetupDialog();

if (printerSettings != null)
{
       //add your code here
}
See Also