Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfPrinterSettings.DXSettings Property

Obtains cross-platform printing settings.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Drawing

#Declaration

public DXPrinterSettings DXSettings { get; }

#Property Value

Type Description
DXPrinterSettings

An object that contains cross-platform printing settings.

#Property Paths

You can access this nested property as listed below:

Library Object Type Path to DXSettings
WinForms Controls PdfPageSetupDialogShowingEventArgs
.PrinterSettings .DXSettings
WPF Controls PageSetupDialogShowingEventArgs
.PrinterSettings .DXSettings

#Remarks

Use the DXSettings property to obtain printing settings that can be used to print PDF files in non-Windows environments (macOS and Unix-based systems that support printing through Common UNIX Printing System (CUPS)).

Note

Install the libcups2 package separately to enable printing.

#Example

The following code sample specifies cross-platform printing settings and prints the PDF file:

using DevExpress.Drawing.Printing;
using DevExpress.Pdf;

// Load a PDF file
PdfDocumentProcessor documentProcessor = new PdfDocumentProcessor();
documentProcessor.LoadDocument(@"..\..\Demo.pdf");

// Declare printer settings
PdfPrinterSettings pdfPrinterSettings = new PdfPrinterSettings();

// Specify printer settings
pdfPrinterSettings.PageNumbers = new int[] { 1, 3, 4, 5 };

// Specify CUPS printer settings
DXPrinterSettings dxPrinterSettings = pdfPrinterSettings.DXSettings;
dxPrinterSettings.Duplex = DXDuplexMode.DuplexLongEdge;
dxPrinterSettings.Copies = 3;

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