# Convert PowerPoint Presentations to Markdown in Java

> Convert PowerPoint slides—PPT, PPTX—to clean Markdown with Aspose.Slides for Java, automate documentation and keep formatting.

Source: https://docs.aspose.com/slides/java/convert-powerpoint-to-markdown/
Updated: 2026-08-05


## **Introduction**

Aspose.Slides allows you to convert PowerPoint presentations to Markdown, which can be useful for documentation workflows, static site generation, content migration, and version-controlled text publishing. The API supports direct export from PPT and PPTX presentations to MD files and provides additional options to control how slide content is represented in the resulting Markdown document.

You can export presentations as plain Markdown, choose from multiple Markdown flavors such as CommonMark and GitHub Flavored Markdown, and configure how images are handled during export. For presentations that contain visual content, Aspose.Slides also lets you save images to a separate folder and reference them from the generated Markdown file.

{{% alert color="warning" %}}

PowerPoint to markdown export is **without images** by default. If you want to export a PowerPoint document containing images, set the export type to `MarkdownExportType.Visual` or `MarkdownExportType.Sequential` - the default `MarkdownExportType.TextOnly` value skips images. Use `setBasePath` to choose where the images referenced in the markdown document are saved; that folder must already exist, otherwise the save fails.

{{% /alert %}}

## **Convert PowerPoint to Markdown**

1. Create an instance of the [Presentation](https://reference.aspose.com/slides/java/com.aspose.slides/presentation/) class to represent a presentation object.
2. Use the [Save ](https://reference.aspose.com/slides/java/com.aspose.slides/presentation/#save-com.aspose.slides.IXamlOptions-)method to save the object as a markdown file.

This Java code shows you how to convert PowerPoint to markdown:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    pres.save("pres.md", SaveFormat.Md);
} finally {
    if (pres != null) pres.dispose();
}
```

## **Convert PowerPoint to Markdown Flavor**

Aspose.Slides allows you to convert PowerPoint to markdown (containing basic syntax), CommonMark, GitHub flavored markdown, Trello, XWiki, GitLab, and 17 other markdown flavors.

This Java code shows you how to convert PowerPoint to CommonMark:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    MarkdownSaveOptions markdownSaveOptions = new MarkdownSaveOptions();
    markdownSaveOptions.setFlavor(Flavor.CommonMark);
    pres.save("pres.md", SaveFormat.Md, markdownSaveOptions);
} finally {
    if (pres != null) pres.dispose();
}
```

The 23 supported markdown flavors are [listed under the Flavor enumeration](https://reference.aspose.com/slides/java/com.aspose.slides/flavor/) from the [MarkdownSaveOptions](https://reference.aspose.com/slides/java/com.aspose.slides/markdownsaveoptions/) class.

## **Convert a Presentation Containing Images to Markdown**

The [MarkdownSaveOptions](https://reference.aspose.com/slides/java/com.aspose.slides/markdownsaveoptions/) class provides properties and enumerations that allow you to use certain options or settings for the resulting markdown file. The [MarkdownExportType](https://reference.aspose.com/slides/java/com.aspose.slides/markdownexporttype/) enum, for example, can be set to values that determine how images are rendered or handled: `Sequential`, `TextOnly`, `Visual`.

### **Convert Images Sequentially**

If you want the images to appear individually one after the other in the resulting markdown, you have to choose the sequential option. This Java code shows you how to convert a presentation containing images to markdown:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    MarkdownSaveOptions markdownSaveOptions = new MarkdownSaveOptions();
    markdownSaveOptions.setShowHiddenSlides(true);
    markdownSaveOptions.setShowSlideNumber(true);
    markdownSaveOptions.setFlavor(Flavor.Github);
    markdownSaveOptions.setExportType(MarkdownExportType.Sequential);
    markdownSaveOptions.setNewLineType(NewLineType.Windows);
    pres.save("doc.md", new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, SaveFormat.Md, markdownSaveOptions);
} finally {
    if (pres != null) pres.dispose();
}
```

### **Convert Images Visually**

If you want the images to appear together in the resulting markdown, you have to choose the visual option.   In this case, images will be saved to the current directory of the application (and a relative path will be built for them in the markdown document), or you can specify your preferred path and folder name.

This Java code demonstrates the operation:

```java
import com.aspose.slides.*;

Presentation pres = new Presentation("pres.pptx");
try {
    final String outPath = "output";
    MarkdownSaveOptions markdownSaveOptions = new MarkdownSaveOptions();
    markdownSaveOptions.setExportType(MarkdownExportType.Visual);
    markdownSaveOptions.setImagesSaveFolderName("md-images");
    markdownSaveOptions.setBasePath(outPath);
    pres.save("pres.md", SaveFormat.Md, markdownSaveOptions);
} finally {
    if (pres != null) pres.dispose();
}
```

## **FAQ**

### Do hyperlinks survive the export to Markdown?

Yes. Text [hyperlinks](/slides/java/manage-hyperlinks/) are preserved as standard Markdown links. Slide [transitions](/slides/java/slide-transition/) and [animations](/slides/java/powerpoint-animation/) are not converted.

### Can I speed up conversion by running it in multiple threads?

You can parallelize across files, but [don’t share](/slides/java/multithreading/) the same [Presentation](https://reference.aspose.com/slides/java/com.aspose.slides/presentation/) instance across threads. Use separate instances/processes per file to avoid contention.

### What happens to images—where are they saved, and are the paths relative?

[Images](/slides/java/image/) are exported to a dedicated folder, and the Markdown file references them with relative paths by default. You can configure the base output path and asset folder name to keep a predictable repository structure.

