The article will guide you how to convert PowerPoint (.pptx and .ppt) documents to XPS by using Spire.Presentation for Java.
Here is the screenshot of the sample PowerPoint file.
import com.spire.presentation.*; public class PPTtoXPS { public static void main(String[] args) throws Exception{ //create a presentation instance Presentation ppt = new Presentation(); //load the sample PowerPoint file ppt.loadFromFile("Sample.pptx"); //save to XPS file ppt.saveToFile("toXPS.xps", FileFormat.XPS); ppt.dispose(); } }
Effective screenshot of the XPS file: