Introduction

Aspose.Slides FOSS for Java is now available on Maven Central: a free, MIT-licensed library for creating, reading, and editing PowerPoint .pptx files entirely in Java, with no dependency on Microsoft Office or any proprietary runtime.

The library is designed for developers who need to generate or manipulate presentation files programmatically: automating slide decks from data, extracting text and metadata from uploaded PPTX files, building presentation-based reporting pipelines, or embedding presentation creation into Spring Boot applications. Because aspose-slides-foss is pure Java, it deploys identically on Windows, macOS, Linux, and Docker containers.

Key Features

  • Full round-trip PPTX support: Open any .pptx file, modify its content, and save it back without losing unknown XML parts that the library does not yet understand.
  • Slides management: Add, remove, and iterate slides using prs.getSlides(); the presentation starts with one blank slide after new Presentation().
  • AutoShapes, Tables, and Connectors: Insert shapes via slide.getShapes().addAutoShape(), tabular data via slide.getShapes().addTable(), and visual connectors between shapes via slide.getShapes().addConnector().
  • Rich text formatting: Format text at character level with PortionFormat: font size, bold, italic, underline, and ARGB color via FillType.SOLID and ColorFormat.
  • Fill types: Apply FillType.SOLID, GRADIENT, PATTERN, or PICTURE fills to any shape.
  • Visual effects: Outer shadow, glow, soft edge, blur, reflection, and inner shadow via shape.getEffectFormat().
  • 3D formatting: Bevel, camera, light rig, material, and extrusion depth via shape.getThreeDFormat().
  • Speaker notes: Attach notes text to each slide via getNotesSlideManager().addNotesSlide().
  • Threaded comments: Add comments with author metadata and slide position.
  • Embedded images: Embed from file path, bytes, or InputStream.
  • Document properties: Read and write core, app, and custom properties.

Getting Started

Add the Maven dependency. Java 11 or later is required.

<dependency>
    <groupId>org.aspose.slides.foss</groupId>
    <artifactId>aspose-slides-foss</artifactId>
    <version>1.0.0</version>
</dependency>

Create your first presentation with a shape and save it:

import org.aspose.slides.foss.*;

public class HelloSlides {
    public static void main(String[] args) {
        try (Presentation prs = new Presentation()) {
            ISlide slide = prs.getSlides().get(0);
            IAutoShape shape = slide.getShapes().addAutoShape(
                ShapeType.RECTANGLE, 50, 50, 400, 120
            );
            shape.addTextFrame("Hello from Aspose.Slides FOSS!");
            prs.save("hello.pptx");
        }
    }
}

Always use Presentation inside a try-with-resources block; this ensures all internal resources are released when the block exits.

Text Formatting Example

import org.aspose.slides.foss.*;

try (Presentation prs = new Presentation()) {
    IAutoShape shape = prs.getSlides().get(0).getShapes().addAutoShape(
        ShapeType.RECTANGLE, 50, 50, 500, 150
    );
    ITextFrame tf = shape.addTextFrame("Bold heading in corporate blue");
    IPortionFormat fmt = tf.getParagraphs().get(0).getPortions().get(0).getPortionFormat();
    fmt.setFontHeight(28);
    fmt.setFontBold(NullableBool.TRUE);
    fmt.getFillFormat().setFillType(FillType.SOLID);
    fmt.getFillFormat().getSolidFillColor().setColor(new Color(0, 70, 127));
    prs.save("formatted.pptx");
}

Current Limitations

The following areas throw UnsupportedOperationException in this release:

  • Charts, SmartArt, and OLE objects
  • Animations and slide transitions
  • Export to PDF, HTML, SVG, or image formats
  • Hyperlinks, action settings, VBA macros, and digital signatures

Unknown XML parts encountered during load are preserved verbatim on save, so PPTX files produced by other tools round-trip safely.

See Also