officefileapi-devexpress-dot-pdf-dot-pdfprintersettings-bd39f82a.md
Provides access to the standard .NET Framework printer settings.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Drawing.dll
NuGet Package : DevExpress.Pdf.Drawing
public PrinterSettings Settings { get; }
Public ReadOnly Property Settings As PrinterSettings
| Type | Description |
|---|---|
| PrinterSettings |
A PrinterSettings object containing the standard .NET Framework printer settings.
|
You can access this nested property as listed below:
| Library | Object Type | Path to Settings |
|---|---|---|
| WinForms Controls | PdfPageSetupDialogShowingEventArgs |
.PrinterSettings .Settings
| | WPF Controls | PageSetupDialogShowingEventArgs |
.PrinterSettings .Settings
|
This property accesses the .NET Framework printer settings containing information on how a document is printed.
A PdfPrinterSettings class is a wrapper of a standard .NET Framework PrinterSettings class which adds additional printer settings.
The code example below prints a document with custom printer settings.
View Example: PDF Document API - Specify the PDF Printer Settings
using DevExpress.Pdf;
// Create a Pdf Document Processor instance
// and load a PDF file
PdfDocumentProcessor documentProcessor = new PdfDocumentProcessor();
documentProcessor.LoadDocument(@"..\..\Demo.pdf");
// Declare printer settings.
PdfPrinterSettings pdfPrinterSettings = new PdfPrinterSettings();
// Specify printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Portrait;
pdfPrinterSettings.PageNumbers = new int[] { 1, 3, 4, 5 };
// Specify the custom scale number
pdfPrinterSettings.ScaleMode = PdfPrintScaleMode.CustomScale;
pdfPrinterSettings.Scale = 90;
// Specify .NET printer settings
PrinterSettings settings = pdfPrinterSettings.Settings;
settings.Duplex = Duplex.Vertical;
settings.Copies = 3;
// Print the document
documentProcessor.Print(pdfPrinterSettings);
Imports DevExpress.Pdf
' Create a Pdf Document Processor instance
' and load a PDF into it.
Dim documentProcessor As New PdfDocumentProcessor()
documentProcessor.LoadDocument("..\..\Demo.pdf")
' Declare the PDF printer settings.
Dim pdfPrinterSettings As New PdfPrinterSettings()
' Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Portrait
pdfPrinterSettings.PageNumbers = New Integer() { 1, 3, 4, 5 }
' Specify the custom scale number
pdfPrinterSettings.ScaleMode = PdfPrintScaleMode.CustomScale
pdfPrinterSettings.Scale = 90
' Specify .NET printer settings
Dim settings As PrinterSettings = pdfPrinterSettings.Settings
settings.Duplex = Duplex.Vertical
settings.Copies = 3
' Print the document using the specified printer settings.
documentProcessor.Print(pdfPrinterSettings)
See Also