Skip to main content

PdfPrinterSettings Class

Provides the additional printer settings to a PDF Viewer.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v23.2.Drawing.dll

NuGet Package: DevExpress.Pdf.Drawing

Declaration

public class PdfPrinterSettings

The following members return PdfPrinterSettings objects:

Library Related API Members
WinForms Controls PdfPageSetupDialogShowingEventArgs.PrinterSettings
PdfViewer.ShowPrintPageSetupDialog()
WPF Controls PageSetupDialogShowingEventArgs.PrinterSettings
PdfViewerControl.ShowPrintPageSetupDialog()

Remarks

Create a PrinterSettings instance and pass it to a PdfPrinterSettings object constructor to specify the standard printer settings.

To apply the specified PDF printer settings, pass the PdfPrinterSettings object as a parameter to one of the following methods:

Example

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 = printerSettings.Settings;
settings.Duplex = Duplex.Vertical;
settings.Copies = 3;


// Print the document
documentProcessor.Print(pdfPrinterSettings);

Inheritance

Object
PdfPrinterSettings
See Also