Convert PowerPoint to XPS
About 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.
Input PPT(X): ** |
Output XPS: ** |
---|
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 Java, 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 Java shows you how to convert a presentation to an XPS document using standard settings:
// Instantiate a Presentation object that represents a presentation file
Presentation pres = new Presentation("Convert_XPS.pptx");
try {
// Saving the presentation to XPS document
pres.save("XPS_Output_Without_XPSOption.xps", SaveFormat.Xps);
} finally {
if (pres != null) pres.dispose();
}
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 Java:
// Instantiate a Presentation object that represents a presentation file
Presentation pres = new Presentation("Convert_XPS_Options.pptx");
try {
// Instantiate the TiffOptions class
XpsOptions options = new XpsOptions();
// Save MetaFiles as PNG
options.setSaveMetafilesAsPng(true);
// Save the presentation to XPS document
pres.save("XPS_Output_With_Options.xps", SaveFormat.Xps, options);
} finally {
if (pres != null) pres.dispose();
}