In this step by step tutorial, we’ll elaborate how to convert PPTX to XPS in C# without interop. The PPTX format is the preferred format for PowerPoint presentations these days, however, you can also convert PPT to XPS in C# applications using the same approach.
Steps to Convert PPTX to XPS in C# without Interop
- Get Aspose.Slides for .NET package from NuGet.org
- Use Aspose.Slides and Aspose.Slides.Export namespaces
- Set license using SetLicense method
- Create a new object of Presentation Class class
- Load the PowerPoint presentation file into the object created above
- Save the input PPTX file format as an output XPS file
Previously, we looked into how to secure PPTX using C# in another how-to topic. However, in this topic the steps given above help you to convert PPTX to XPS in C#. You do not need Microsoft PowerPoint or Interop for this conversion and you can run this code seamlessly on all platforms.
Code to Convert PPTX to XPS in C# without Interop
The above code works with any type of .NET application using the C# code, whether ASP.NET web application, Windows Forms application, or Services. You can run it on your local machine or on a server alike.