In this step by step tutorial, we’ll elaborate how to print PowerPoint Presentation in C# without PowerPoint installed. The PPTX format is widely used format for PowerPoint presentations now a days, but printing PPT presentations as well in C# applications can be achieved using the same approach.
Steps to Print PPTX Presentation in C#
- Get Aspose.Slides for .NET package from NuGet.org
- Use Aspose.Slides namespace to load and print
- Set license using SetLicense method
- Create a new object of Presentation Class
- Load the PowerPoint presentation for printing into the object created above
- Print PPTX Presentation by providing your printer name
Previously, we looked into how to convert PPTX to XPS using C# in another how-to topic. But this topic describe the steps to Print PPT presentation in C#. Good thing is that, you are not dependent on Microsoft PowerPoint or Interop to use this feature and can run this code seamlessly on all platforms.
Code to Print PowerPoint presentation in C# without Interop
The above example is usable in any .NET application using the C# code, whether it’s an ASP.NET web application, Windows Forms application, or Console based. You may execute it on your local work machine or on any server having .NET Framework installed.