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

Aspose.Slides for Java


Create & Convert Excel Spreadsheets via Java API

Java PowerPoint presentation Library to create, edit, merge, clone, protect, convert and manipulate PowerPoint PPT, PPTX presentations.

Aspose.Slides for Java is a very powerful API helping software developers to generate, manipulate and convert PowerPoint presentations inside their own Java applications without using Microsoft PowerPoint or any other applications. With its easy-to-use interface and well-documented code examples, it's a great choice for developers looking to add PowerPoint functionality to their Java applications.

Aspose.Slides for Java API enables software programmers to save presentations in a variety of formats, as well as convert presentations from one format to another with just a couple of lines of Java code. It allows conversion to PPT, OOXML presentation format (PPTX), PDF, XPS, TIFF, ODP, HTML, and many more. Moreover, it also supports conversion from PPT to PPTX, ODP to PPTX Conversion, presentation slides to Scalable Vector Graphics (SVG) format, render presentation slides to TIFF, PNG, BMP, JPEG, and GIF, and many more.

Aspose.Slides for Java is an advanced and versatile API with a wide range of features and support for multiple platforms and PowerPoint versions. The library supports creating presentations from scratch, modifying existing presentations, applying formatting and styling, inserting charts and diagrams, inserting new slides, adding slide transitions, adding animations to slides, text animations as well as object animations, and many more. The library also provided support for different versions of PowerPoint including PowerPoint 2007, 2010, 2013, 2016, and 2019, and also supports the new Open XML format used in PowerPoint 2007 and later.

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

	<name>Aspose Java API</name>

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



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.

Creating 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.

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

Presentation pres = new Presentation("presentation.pptx");
try {
    PdfOptions pdfOptions = new PdfOptions();

    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.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. 

Creating 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);

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


    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();