DocumentPrint Method (PrinterSettings)

Prints the document according to the specified printer settings, using the standard (no User Interface) print controller.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public void Print(
	PrinterSettings printerSettings
)

Parameters

printerSettings
Type: System.Drawing.PrintingPrinterSettings
The printer settings to use.
Remarks

The PrinterSettings object allows you to specify the printer to print on, the range of pages of to print and other options.

Examples
Prints a range of pages.
Document doc = new Document(MyDir + "Rendering.docx");

PrinterSettings printerSettings = new PrinterSettings();
// Page numbers in the .NET printing framework are 1-based
printerSettings.FromPage = 1;
printerSettings.ToPage = 3;

doc.Print(printerSettings);
See Also