Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aspose-com-kb/8a67b0a02d228faf0e64e46ee286962d to your computer and use it in GitHub Desktop.
Save aspose-com-kb/8a67b0a02d228faf0e64e46ee286962d to your computer and use it in GitHub Desktop.
Convert PowerPoint Presentation to XPS Format in C#: Find more details about this code sample in the following topic: https://kb.aspose.com/slides/net/how-to-convert-pptx-to-xps-in-csharp-without-interop/
using System;
//Add reference to Aspose.Slides for .NET API
//Use following namespaces to convert PPTX to XPS
using Aspose.Slides;
using Aspose.Slides.Export;
namespace ConvertPPTXToXPS
{
class Program
{
static void Main(string[] args)
{
//Set license before converting PPTX to XPS
Aspose.Slides.License AsposeSlidesLicense = new Aspose.Slides.License();
AsposeSlidesLicense.SetLicense(@"c:\asposelicense\license.lic");
//load input PowerPoint presentation
Presentation PowerPointPresentation = new Presentation("InputPowerPointPresentation.pptx");
//save output XPS file
PowerPointPresentation.Save("PresentationConvertedToXPS.xps", SaveFormat.Xps);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment