Skip to main content
All docs
V25.1
  • Print Created or Loaded Presentations with DevExpress Presentation API

    • 2 minutes to read

    The DevExpress Presentation API library allows you to print PPTX files. You can print presentations with the default printer or specify print settings.

    Important

    The DevExpress Presentation API Library is currently available as a Community Technology Preview (CTP). Note that we do not recommend that you integrate pre-release libraries into mission-critical software applications. You can try the library and share your feedback so that we can make necessary adjustments before the official release. To start a conversation, submit a ticket via the DevExpress Support Center — we’d love to hear from you.

    Call the Presentation.Print() method to print presentation with the default printer.

    using DevExpress.Docs.Presentation;
    using DevExpress.Docs.Presentation.Printing;
    //...
    
    using (var presentation = new Presentation(File.ReadAllBytes(@"C:\Documents\presentation.pptx"))) {
        presentation.Print();
    }
    

    Specify Printer Settings

    Use the PrintOptions object to specify print options.

    The PrintOptions.PrinterSettings property allows you to specify cross-platform printer settings (the page range, the number of copies, and so on). Specify these options to print presentations 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 in non-Windows environments.

    The following code snippet specifies print options and prints the loaded presentation:

    using DevExpress.Docs.Presentation;
    using DevExpress.Docs.Presentation.Printing;
    //...
    
    using (var presentation = new Presentation(File.ReadAllBytes(@"C:\Documents\presentation.pptx"))) {
        PrintOptions options = new PrintOptions();
        options.PrintHiddenSlides = true;
        options.PrinterSettings.Copies = 2;
        options.PrinterSettings.PageRange = "2-3";
    
        presentation.Print(options);
    }