Print Presentation

Overview

Aspose.Slides for .NET provides four overloads methods for the printing of the presentations. These methods are flexible enough to print the presentation to the default printer or to any of the available printers with customized settings. You only need to select the appropriate print method according to the requirement.

Printing of the presentation to the default printer is quite simple in Aspose.Slides for .NET. Perform the following steps in order to print the presentation to default printer:

  1. Create an instance of Presentation class to load a presentation that is to be printed
  2. Call the Print method with no parameters as exposed by the Presentation object

In the example given below, we have call the Print method with no parameters.

Printing of the presentation to the specific printer requires the name of the printer as a parameter to the Print method of the Presentation. Perform the following steps in order to print the presentation to the desired printer:

  1. Create an instance of Presentation class to load a presentation that is to be printed.
  2. Call the Print method of the Presentation class with the printer name as a string parameter to the Print method.

In the example given below, we have called the Print method with the printer name as a string parameter to the Print method.

Set Print Options Dynamically

Aspose.Slides provides support for setting the print presentation dynamically with options involving setting Margin, Print copies and also provide an option to preview print setting dialog. To setup printer settings use an instance of System.Drawing.Printing.PrinterSettings class. Perform the following steps in order to print the presentation, set print option like Margin, Print copies and also you can set print option dynamically.

  1. Create an instance of Presentation class to load a presentation that is to be printed
  2. Instantiate printer setting object to represent print settings.
  3. Set number of copies to be printed.
  4. Set orientation of page.
  5. Set margin for a page.
  6. Print preview and print setting dialog.

In the example given below, we have called the Print method with no parameters.