windowsforms-devexpress-dot-xtrarichedit-dot-richeditcontrol-dot-print-x28-system-dot-drawing-dot-printing-dot-printersettings-x29.md
Prints the document with the given printer settings.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.XtraRichEdit.v25.2.dll
NuGet Package : DevExpress.Win.RichEdit
public void Print(
PrinterSettings printerSettings
)
Public Sub Print(
printerSettings As PrinterSettings
)
| Name | Type | Description |
|---|---|---|
| printerSettings | PrinterSettings |
A PrinterSettings instance containing printer settings.
|
Call the Print method to print the target document with the specified options: the number of copies, double-sided printing, etc.
Note
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.
PrinterSettings printerSettings = new PrinterSettings();
//Set the document pages to print:
printerSettings.FromPage = 2;
printerSettings.ToPage = 3;
//Specify the number of copies:
printerSettings.Copies = 2;
//Print the document:
richEditControl1.Print(printerSettings);
Dim printerSettings As New PrinterSettings()
'Set the document pages to print:
printerSettings.FromPage = 2
printerSettings.ToPage = 3
'Specify the number of copies:
printerSettings.Copies = 2
'Print the document:
richEditControl1.Print(printerSettings)
See Also