1. Products
  2.   Presentation
  3.   Java
  4.   Aspose.Slides for Java

Aspose.Slides for Java

 
 

Create & Convert Excel Spreadsheets via Java API

A Leading Java PowerPoint Presentation Library to Create, Edit, Merge, Clone, Protect, Convert and Manipulate PowerPoint PPT, PPTX Presentations using Java API.

What is Aspose.Slides for Java?

Aspose.Slides for Java is a robust API that empowers software developers to generate, modify, and convert PowerPoint presentations seamlessly within Java applications, without requiring Microsoft PowerPoint or third-party tools. Its intuitive interface and well-documented code examples make it an excellent choice for integrating advanced PowerPoint functionality into Java projects. The API supports saving and converting presentations across multiple formats, including PPT, PPTX, PDF, XPS, TIFF, ODP, HTML, and SVG, with just a few lines of code. Additionally, it enables high-fidelity rendering of slides into image formats like PNG, JPEG, BMP, and GIF, making it ideal for dynamic reporting, document processing, and cross-platform compatibility

Beyond basic conversions, Aspose.Slides for Java offers advanced presentation manipulation features, such as creating slides from scratch, applying animations, transitions, and formatting, and embedding charts or diagrams. It supports all major PowerPoint versions, including 2007 through 2019, and leverages the modern Open XML format for enhanced performance. Whether automating business reports, building presentation generators, or migrating legacy files, this API provides enterprise-grade flexibility while eliminating dependencies on desktop software. Its cross-platform compatibility ensures smooth integration into Java-based workflows, making it a top choice for developers needing scalable, code-driven PowerPoint solutions.

Previous Next

Getting Started with Aspose.Slides for Java

Aspose hosts all Java APIs on Maven repositories. You can use Aspose.Slides for Java API directly in your Maven projects with simple configurations. Specify Aspose Maven Repository configuration/location in your Maven pom.xml this way.

Maven repository for Aspose.Slides for Java



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

//Define Aspose.Slides for Java API dependency in your pom.xml this way:

<dependencies>
	<dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-slides</artifactId>
	<version>XX.XX</version>
    <classifier>jdk16</classifier>
	</dependency>

    <dependency>
	<groupId>com.aspose</groupId>
	<artifactId>aspose-slides</artifactId>
	<version>23.1</version>
    <classifier>javadoc</classifier>
	</dependency>

</dependencies>
You can also download it directly from Aspose product release page.

Create & Manipulate Presentations via Java API

Aspose.Slides for Java API enables software developers to create and manipulate PowerPoint presentations inside their own Java application. The library also supports opening existing presentations and makes changes to it and save it back in various file formats. You can also open password protected presentations as well as very large presentation with ease. The library also supports merging existing presentation, add new slide to existing, apply new formatting to slides, examine existing presentation, get properties of existing presentations, and so on.

How to Create Presentations & Add a Line to First Slide via .NET API?

// Instantiate a Presentation object that represents a presentation file
Presentation pres = new Presentation();
try {
    // Get the first slide
    ISlide slide = pres.getSlides().get_Item(0);

    // Add an autoshape of type line
    slide.getShapes().addAutoShape(ShapeType.Line, 50, 150, 300, 0);
    pres.save("NewPresentation_out.pptx", SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}

Presentations Conversion to PDF, XPS, ODP via Java API

Aspose.Slides for Java library gives software developers the ability to convert PowerPoint presentations to various file formats with just a couple of lines of Java code. It supports conversion to PowerPoint (PPT, PPTX), OpenDocument (ODP), PDF, HTML, PDF/A, XPS, SWF Flash, and image (JPEG, PNG, BMP, TIFF, GIF) files. Developers can specify different options while saving the presentation, such as password protection, encryption, and more. The library is designed to work seamlessly with Java applications making it an ideal solution for developers who need to convert PowerPoint presentations as part of their application's workflow.

How to Convert Presentation to PDF in Notes Slide View via .NET API?

Presentation pres = new Presentation("presentation.pptx");
try {
    PdfOptions pdfOptions = new PdfOptions();
    pdfOptions.getNotesCommentsLayouting().setNotesPosition(NotesPositions.BottomFull);

    pres.save(resourcesOutputPath+"PDF-Notes.pdf", SaveFormat.Pdf, pdfOptions);
} finally {
    if (pres != null) pres.dispose();
}

Secure Presentation using Java API

Aspose.Slides for Java has provided the capability to secure their PowerPoint presentation inside Java applications. The library has included numerous functions for securing their presentations, such as secure presentations by setting password protection, Digital Signature same like PowerPoint, Add Text Watermark or image watermark to slide and many more. This can also be done by using the built-in encryption options available in the API, such as setting a password for opening the presentation, restricting editing or printing of the presentation, and setting permissions for different users.

How to Encrypt a Presentation via C# API?

Presentation presentation = new Presentation("pres.pptx");
try {
    presentation.getProtectionManager().encrypt("123123");
    presentation.save("encrypted-pres.pptx", SaveFormat.Pptx);
} finally {
    if (presentation != null) presentation.dispose();
}

Create & Manage Charts in Presentation via Java

There are several libraries in Java that can be used to create and manage charts in presentations. Aspose.Slides for Java is a powerful tool for creating and managing charts in presentations. The library allows too easily add charts to presentations, customize their appearance and data, and even create charts from scratch. The library supports various types of charts, such as doughnut chart, data points of treemap and sunburst chart, 3D chart, bubble chart, pie chart and so on. Once you have created a chart, you can easily customize its appearance and data by using the various properties and methods of the Chart class. For example, you can change the chart type, set the axis labels, add data series, and more. 

How to Create Funnel Charts in Presentation's Slide via .NET API?

Presentation pres = new Presentation();
try {
    IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Funnel, 50, 50, 500, 400);
    chart.getChartData().getCategories().clear();
    chart.getChartData().getSeries().clear();

    IChartDataWorkbook wb = chart.getChartData().getChartDataWorkbook();

    wb.clear(0);

    chart.getChartData().getCategories().add(wb.getCell(0, "A1", "Category 1"));
    chart.getChartData().getCategories().add(wb.getCell(0, "A2", "Category 2"));
    chart.getChartData().getCategories().add(wb.getCell(0, "A3", "Category 3"));
    chart.getChartData().getCategories().add(wb.getCell(0, "A4", "Category 4"));
    chart.getChartData().getCategories().add(wb.getCell(0, "A5", "Category 5"));
    chart.getChartData().getCategories().add(wb.getCell(0, "A6", "Category 6"));

    IChartSeries series = chart.getChartData().getSeries().add(ChartType.Funnel);

    series.getDataPoints().addDataPointForFunnelSeries(wb.getCell(0, "B1", 50));
    series.getDataPoints().addDataPointForFunnelSeries(wb.getCell(0, "B2", 100));
    series.getDataPoints().addDataPointForFunnelSeries(wb.getCell(0, "B3", 200));
    series.getDataPoints().addDataPointForFunnelSeries(wb.getCell(0, "B4", 300));
    series.getDataPoints().addDataPointForFunnelSeries(wb.getCell(0, "B5", 400));
    series.getDataPoints().addDataPointForFunnelSeries(wb.getCell(0, "B6", 500));

    pres.save("Funnel.pptx", SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}
 English