# Extract Text and Images from ODP Documents using Java

> Extract text and images from ODP files in Java using Aspose.Slides for Java.

Source: https://products.aspose.com/slides/java/parser/odp/
Updated: 2026-08-11



## Parse ODP File Using Java

Use [Aspose.Slides for Java](/slides/java/) to parse ODP presentations and extract text from slides. You can add the library to a Maven-based project by using the repository and dependency configuration below in your `pom.xml` file.

### Repository

```xml
<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository>
```

### Dependency

```xml
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>version of aspose-slides API</version>
    <classifier>jdk17</classifier>
</dependency>
```

## How to Parse ODP Files in Java

Extract text from an ODP presentation with Aspose.Slides for Java in a few lines of code.

Load the `ODP` file with the `Presentation` class.

Call the `SlideUtil.getAllTextBoxes` method to get text frames from the first slide.

Loop through each `ITextFrame`, `IParagraph`, and `IPortion` object.

Read text, font height, and font name from each `IPortion` object.

## System Requirements

Aspose.Slides for Java supports major platforms and operating systems. Make sure that your environment includes the following prerequisites.

- Microsoft Windows or a compatible operating system with a Java Runtime Environment for JSP/JSF applications and desktop applications.
- The latest version of Aspose.Slides for Java from [Maven](https://releases.aspose.com/java/repo/).

### Parse ODP Files - Java

```java
Presentation presentation = new Presentation("demo.odp");
try {
    ISlide slide = presentation.getSlides().get_Item(0);
    ITextFrame[] slideTextFrames = SlideUtil.getAllTextBoxes(slide);

    for (ITextFrame textFrame : slideTextFrames) {
        for (IParagraph paragraph : textFrame.getParagraphs()) {
            for (IPortion portion : paragraph.getPortions()) {
                System.out.print(portion.getText());
                System.out.print(portion.getPortionFormat().getFontHeight());
                System.out.print(portion.getPortionFormat().getLatinFont().getFontName());
            }
        }
    }
} finally {
    presentation.dispose();
}
```

## About Aspose.Slides for Java API

Aspose.Slides for Java can read, write, manipulate, and convert presentation documents to formats such as PDF, XPS, HTML, TIFF, and ODP. It is a standalone API for creating, parsing, and manipulating presentations, slides, and slide elements.

Files with the ODP extension use the OpenDocument Presentation format. An ODP file stores slides that can contain text, images, formatting, animations, and other presentation content.

## Other Supported Parsing Documents

- [PPT](/slides/java/parser/ppt/) — PowerPoint 97-2003 Presentation
- [PPTX](/slides/java/parser/pptx/) — Open XML Presentation Format
