PresentationML (PPTX, XML)

PresentationML in Aspose.Slides for Java

OOXML PresentationML documents come as PPTX files, zipped XML packages that follow the OOXML ECMA-376 specification. Aspose.Slides for Java extensively supports creating, reading, manipulating and writing PresentationML documents. In addition, Aspose.Slides for Java is capable of exporting PresentationML documents to a widely used document format like PDF. This is possible because Aspose.Slides for Java was designed with the aim to comprehensively handle presentation documents and PresentationML basically holds the internal presentation of documents as a zipped XML package.

A PPTX document generated by Aspose.Slides for Java and opened in Microsoft PowerPoint


Viewing the same PPTX document generated by Aspose.Slides for Java in a ZIP


PresentationML is Open, Why Use Aspose.Slides for Java?

Since PresentationML is XML based, it is quite possible to build applications to process and generat PresentationML documents using XML classes without relying on a third party class library such as Aspose.Slides for Java. However, there are several advantages of using Aspose.Slides for Java over XML classes when working with PresentationML documents.

The OOXML specification is several thousand pages long so to properly handle the PresentationML documents, you have to spend a lot of time and effort to understand the format. On the other hand, with Aspose.Slides for Java, you just use classes and their methods and properties to performing operations which seem complex if performed via XML classes.

Some of the features that Aspose.Slides offer are not even available when you work with PresentationML documents through XML classes:

  • Export PPT documents to PDF format.
  • Render a slide to any image format supported by the Java Framework.
  • Automatically copy masters from a source presentations using the cloning feature.
  • Apply protection to shapes.

Below is an example of a PresentationML document with a single slide containing a text box with the text “Hello World”. To read the text using XML classes, you have to write a program that can parse this simple text from the following fragment. Aspose.Slides does that for you.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sld xmlns:a="" xmlns:r="" xmlns:p="">
        <p:cNvPr id="1" name=""/>
          <a:off x="0" y="0"/>
          <a:ext cx="0" cy="0"/>
          <a:chOff x="0" y="0"/>
          <a:chExt cx="0" cy="0"/>
          <p:nvSpPr><p:cNvPr id="4" name="TextBox 3"/>
          <p:cNvSpPr txBox="1"/>
              <a:off x="2819400" y="2590800"/>
              <a:ext cx="1297086" cy="369332"/>
            <a:prstGeom prst="rect">
            <a:bodyPr wrap="none" rtlCol="0">
                <a:rPr lang="en-US"/>
                <a:t>Hello World
              <a:endParaRPr lang="en-US"/>