RichEditDocumentServer.Print(PrinterSettings, String) Method
Prints the document with the given printer settings and document name.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
#Declaration
public void Print(
PrinterSettings printerSettings,
string printDocumentName
)
#Parameters
Name | Type | Description |
---|---|---|
printer |
Printer |
A Printer |
print |
String | A string indicating the document name to be printed. |
#Remarks
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.) and a custom name to print the target document.
Note
Printer
Warning
The Print
method overload works only on Windows OS. The Platform
is thrown on other operating systems. Use the Print
method overloads with DXPrinter
parameter to print on other operating systems.
#Example
// Load a document from a file.
wordProcessor.LoadDocument("Documents\\Grimm.docx", DocumentFormat.OpenXml);
// Print the document to the default printer with the default settings.
wordProcessor.Print();