---
Product: Aspose.Slides
Platform: java
Page Type: docs
Canonical URL: https://docs.aspose.org/slides/java/getting-started/quickstart
---

# Quick Start

Get up and running with Aspose.Slides FOSS for Java in minutes: create a presentation, add shapes and text, apply fills, and save to PPTX using Presentation, ShapeType, FillType, and NullableBool.

## Overview

This guide walks through the steps from installation to a saved `.pptx` file using
Aspose.Slides FOSS for Java. The library is MIT-licensed, requires no Microsoft Office,
and runs on any platform supporting Java 21 or later.

---

### Prerequisites

| Requirement | Detail |
|-------------|--------|
| Java | 21 or later |
| OS | Windows, macOS, Linux, Docker |
| Package | `aspose-slides-foss` from Maven Central |

---

### Install

Add the Maven dependency to your `pom.xml`. Wrap `Presentation` in a try-with-resources block; the library releases internal file handles when the block exits:

```xml
<dependency>
  <groupId>org.aspose</groupId>
  <artifactId>aspose-slides-foss</artifactId>
  <version>26.7.0</version>
</dependency>
```

---

### Create a Presentation

Construct a `Presentation` with no arguments to create a blank deck. The resulting object starts with a single blank slide ready to use. Call `save()` with the output file path:

```java
import org.aspose.slides.foss.Presentation;

try (Presentation prs = new Presentation()) {
    prs.save("empty.pptx");
}
```

---

### Add a Shape with Text

Access the first slide via `getSlides().get(0)`, insert a rectangle using
`getShapes().addAutoShape()`, then attach text via `addTextFrame()`:

```java
import org.aspose.slides.foss.Presentation;
import org.aspose.slides.foss.ISlide;
import org.aspose.slides.foss.ISlideCollection;
import org.aspose.slides.foss.IAutoShape;
import org.aspose.slides.foss.ITextFrame;
import org.aspose.slides.foss.IPortionFormat;
import org.aspose.slides.foss.ShapeType;
import org.aspose.slides.foss.NullableBool;

try (Presentation prs = new Presentation()) {
    ISlideCollection slides = prs.getSlides();
    ISlide slide = slides.get(0);
    IAutoShape shape = slide.getShapes().addAutoShape(
        ShapeType.RECTANGLE, 50, 50, 400, 150
    );
    ITextFrame tf = shape.addTextFrame("Hello from Aspose.Slides FOSS!");
    IPortionFormat fmt = tf.getParagraphs().get(0).getPortions().get(0).getPortionFormat();
    fmt.setFontHeight(24);
    fmt.setFontBold(NullableBool.TRUE);
    prs.save("with_shape.pptx");
}
```

---

### Apply a Solid Fill

Set `setFillType(FillType.SOLID)` on the shape's fill format and provide a color
via `getSolidFillColor().setColor(new Color(r, g, b))`:

```java
import org.aspose.slides.foss.Presentation;
import org.aspose.slides.foss.ISlide;
import org.aspose.slides.foss.ISlideCollection;
import org.aspose.slides.foss.IAutoShape;
import org.aspose.slides.foss.ShapeType;
import org.aspose.slides.foss.FillType;
import org.aspose.slides.foss.drawing.Color;

try (Presentation prs = new Presentation()) {
    ISlideCollection slides0 = prs.getSlides();
    ISlide slide0 = slides0.get(0);
    IAutoShape shape = slide0.getShapes().addAutoShape(
        ShapeType.RECTANGLE, 100, 100, 400, 200
    );
    shape.getFillFormat().setFillType(FillType.SOLID);
    shape.getFillFormat().getSolidFillColor().setColor(new Color(70, 130, 180));
    shape.addTextFrame("Styled shape");
    prs.save("styled.pptx");
}
```

---

### Load an Existing File

Pass a file path to the `Presentation` constructor to open an existing `.pptx` file.
Read the slide count, modify the deck as needed, then call `save()` to write the output:

```java
import org.aspose.slides.foss.Presentation;

try (Presentation prs = new Presentation("existing.pptx")) {
    System.out.println("Slides: " + prs.getSlides().size());
    prs.save("copy.pptx");
}
```

---

### Next Steps

- [Installation](installation/)
- [Features and Capabilities](../developer-guide/features/)
- [Working with Comments](../developer-guide/working-with-comments/)
- [Working with Connectors](../developer-guide/working-with-connectors/)
- [KB Articles](https://kb.aspose.org/slides/java/)

## See Also

- [Aspose.Slides for Java — Enterprise Documentation](https://docs.aspose.com/slides/java/)