Skip to main content

RichEditControl.Print(PrinterSettings) Method

Prints the document with the given printer settings.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v22.1.dll

NuGet Package: DevExpress.Wpf.RichEdit


public void Print(
    PrinterSettings printerSettings


Name Type Description
printerSettings PrinterSettings

A PrinterSettings instance containing printer settings.


Call the Print method to specify the desired options (define the printer name, the number of copies, the paper size, enable double-sided printing, etc.) to print the target document.


PrinterSettings properties, such as PageSettings.Margins or PageSettings.Landscape (accessed using the PrinterSettings.DefaultPageSettings property), do not affect the layout of a printed document. Change the desired settings of a document section (accessed by the Section.Page property) to modify the document page layout properties before printing.


View Example

if (layoutCheckItem.IsChecked == true) { ChangeDocumentLayout(); }
PrinterSettings printerSettings = new PrinterSettings();
printerSettings.FromPage = 2;
printerSettings.ToPage = 3;
MessageBox.Show("Printing "+ printerSettings.Copies.ToString()+" copy(ies) of pages "+ printerSettings.FromPage+ "-"+ printerSettings.ToPage);
See Also