Convert PowerPoint to XPS
Microsoft developed XPS as an alternative to PDF. It allows you to print content by outputting a file very similar to a PDF. The XPS format is based on XML. The layout or structure of an XPS file remains the same on all operating systems and printers.
When to Use Microsoft XPS Format
If you want to cut down on storage costs, you can convert your Microsoft PowerPoint presentation to the XPS format. This way, you will find it easier to save, share, and print your documents.
Microsoft continues to implement strong support for XPS in Windows (even in Windows 10), so you may want to consider saving files to this format. If you are dealing with Windows 8.1, Windows 8, Windows 7, and Windows Vista, then XPS might actually be your best option for certain operations.
Windows 8 uses the OXPS (Open XPS) format for XPS files. OXPS is a standardized version of the original XPS format. Windows 8 provides better support for XPS files than it does for PDF files.
- XPS: Built-in XPS viewer/reader and printing to XPS feature available.
- PDF: PDF reader available but no printing to PDF feature.
Windows 7 and Windows Vista use the original XPS format. These operating systems also provide better support for XPS files than they do for PDFs.
XPS: Built-in XPS viewer and printing to XPS feature available.
PDF: No PDF reader. No printing to PDF feature.
Microsoft eventually implemented support for printing operations in PDF through the Print to PDF feature in Windows 10. Previously, users were expected to print documents through the XPS format.
XPS Conversion with Aspose.Slides
In Aspose.Slides for .NET, you can use the Save method exposed by the Presentation class to convert the entire presentation into an XPS document.
When converting a presentation to XPS, you have to save the presentation using either of these settings:
- Default settings (without XPSOptions)
- Custom settings (with XPSOptions)
Converting Presentations to XPS Using Default Settings
This sample code in Python shows you how to convert a presentation to an XPS document using standard settings:
import aspose.slides as slides # Instantiate a Presentation object that represents a presentation file pres = slides.Presentation("Convert_XPS.pptx") # Saving the presentation to XPS document pres.save("XPS_Output_Without_XPSOption_out.xps", slides.export.SaveFormat.XPS)
Converting Presentations to XPS Using Custom Settings
This sample code shows you how to convert a presentation to an XPS document using custom settings in Python:
import aspose.slides as slides # Instantiate a Presentation object that represents a presentation file pres = slides.Presentation("Convert_XPS_Options.pptx") # Instantiate the TiffOptions class options = slides.export.XpsOptions() # Save MetaFiles as PNG options.save_metafiles_as_png = True # Save the presentation to XPS document pres.save("XPS_With_Options_out.xps", slides.export.SaveFormat.XPS, options)