Skip to main content
All docs
V25.1
  • PdfPrinterSettings.DXSettings Property

    Obtains cross-platform printing settings.

    Namespace: DevExpress.Pdf

    Assembly: DevExpress.Pdf.v25.1.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