Using Aspose.Total for Java you can easily convert XSLFO to POT within any Java J2SE, J2EE, J2ME application. Firstly, by using Aspose.PDF for Java , you can export XSLFO to PPTX. After that, by using Aspose.Slides for Java PowerPoint Processing API, you can convert PPTX to POT.
Java API to Convert XSLFO to POT
- Open XSLFO file using Document class
- Convert XSLFO to PPTX by using save method
- Load PPTX document by using Presentation class
- Save the document to POT format using
method and set
Get Started with Java File Format APIs
You can easily use Aspose.Total for Java directly from a Maven based project and include Aspose.PDF for Java and Aspose.Slides for Java in your pom.xml.
Alternatively, you can get a ZIP file from downloads .
// load XSLFO file with an instance of Document class Document document = new Document("template.xslfo"); // save XSLFO as PPTX format document.save("PptxOutput.pptx", SaveFormat.Pptx); // instantiate a Presentation object that represents a PPTX file Presentation presentation = new Presentation("PptxOutput.pptx"); // save the presentation as Pot format presentation.save("output.pot", SaveFormat.Pot);
Open Encrypted XSLFO File via Java
While loading XSLFO file format, your document might be password protected. Aspose.PDF for Java allows you open encrypted documents as well. In order to open the encrypted file, you can initialize new instance of the Document class and pass filename and password as arguments.
// open XSLFO document Document doc = new Document("input.xslfo", "Your@Password"); // save XSLFO as PPTX format document.save("PptxOutput.pptx", SaveFormat.Pptx);
Save POT File with Predefined View Type via Java
After converting XSLFO to POT, you can also add predefined view type for your presentation. Aspose.Slides for Java provides a facility to set the view type for the generated presentation when it is opened in PowerPoint through the ViewProperties class. The setLastView property is used to set the view type by using the ViewType enumerator.
// instantiate a Presentation object that represents a PPTX file Presentation presentation = new Presentation("PptxOutput.pptx"); // set view type presentation.getViewProperties().setLastView((byte) ViewType.SlideMasterView); // save the presentation as Pot format presentation.save("output.pot", SaveFormat.Pot);
Explore XSLFO Conversion Options with Java
What is XSLFO File Format
XSLFO is a XML-based page description language. It is most often used to generate PDF documents from XML data. XSLFO defines the layout and appearance of pages and page elements. It includes features for defining the size and position of pages and page elements, the font and color of text, and the rules for flowing text from one page to another. XSLFO is part of the XSLT standard, and can be used with any XML document.Read More
What is POT File Format
Microsoft PowerPoint Template Files POT format is a file format that is used to store PowerPoint templates. A POT file contains a collection of slides that can be used to create a PowerPoint presentation. POT files are typically created by PowerPoint users who want to share their templates with others.Read More