[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Collapse]PDF Viewer
    Getting Started
    Coordinate Systems
   [Expand]Additional Content
   [Expand]Interactive Forms
   [Expand]Manipulate Document Content
    Adjust the Document View
   [Expand]Visual Elements
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


This document describes how to print a document and customize print settings.

You can print the current document using the Print dialog. To invoke it, use one of the following ways:

  • click the Print command located on the File toolbar button group;

  • press CTRL+P;
  • right-click the document area and select the Print... item in the context menu.

To invoke the Print dialog in code, call one of the PdfViewer.Print overloaded methods that don't require parameters.

In the invoked Print dialog, you can choose the printer and specify the following printing parameters.

Page range selection can include a set of pages such as 2-5. As a result, 2, 3, 4, 5 pages are printed. You can also stipulate the order of pages, so 2-5, 1, 6 will print pages 2-5, then page 1 followed by page 6.

You can also choose the required option: fit to page, actual size or custom page scaling.

Page orientation can be specified as portrait or landscape. Alternatively, you can tell the printing system to auto calculate the orientation. If the scaling option is set to "fit to page" and orientation is set to "auto", the print engine will attempt to set the orientation and scaling to use most of the available paper size.

To print a document, click the Print button in the Print dialog.

To specify the required printer settings before the Print dialog is shown, handle the PdfViewer.PageSetupDialogShowing event.

To print a document without invoking the Print dialog in code, call the corresponding overload of the PdfViewer.Print method and pass the printer settings (represented by the PdfPrinterSettings object) to this method as an argument.

Before printing a document, you can specify whether to show or hide the print status dialog using the PdfViewer.ShowPrintStatusDialog property.

When the document is printing, the PdfViewer.QueryPageSettings and PdfViewer.PrintPage events are raised. You can perform actions when the document is sent to a printer by handling these events. For example, when the PdfViewer.PrintPage event is handled, you can get the current page number using the PdfPrintPageEventArgs.PageNumber property and cancel the printing on a specific page by setting the e.Cancel property to true.

Is this topic helpful?​​​​​​​