Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

README.md

Java PowerPoint API

Aspose.Slides a Java PowerPoint API for presentation manipulation and management. It allows developers to read, write, convert and manipulate PowerPoint presentations in Java applications with the ability to manipulate all document elements such as slides, tables, text, charts, shapes, images and SmartArt diagrams and more.

Directory Description
Examples A collection of Java examples that help you learn how to use product features.
Plugins Plugins to help integrate Aspose.Slides for Java in different environments.

PowerPoint File Manipulation via Java

Checkout the product overview to know all about Aspose.Slides for Java.

  • Load & convert presentations to other formats.
  • Create presentations from scratch.
  • Manipulate all of presentation elements via intuitive object model.
  • Create or embed charts.
  • Create or manipulate shapes.

Read & Write Presentations

Microsoft PowerPoint: PPT, PPTX, PPS, POT, PPSX, PPTM, PPSM, POTX, POTM
OpenOffice: ODP, OTP

Save Presentations As

Fixed Layout: PDF, PDF/A, XPS Image: JPEG, PNG, BMP, TIFF, GIF, SVG Web: HTML, SWF

Supported Environments

  • Microsoft Windows: Windows Desktop & Server (x86, x64)
  • macOS: Mac OS X
  • Linux: Ubuntu, OpenSUSE, CentOS, and others
  • Java Versions: J2SE 6.0 (1.6) or above

Get Started with Aspose.Slides for Java

Aspose hosts all Java APIs at the Aspose Repository. You can easily use Aspose.Slides for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installing Aspose.Slides for Java from Maven Repository documentation page.

Convert Presentation to PDF

// instantiate a Presentation object that represents a presentation file
Presentation pres = new Presentation(dir + "demo.pptx");

// save the presentation to PDF with default options
pres.save(dir + "output.pdf", SaveFormat.Pdf);

Create Presentation from Scratch

// instantiate Presentation
Presentation pres = new Presentation();

// get the first slide
ISlide sld = (ISlide) pres.getSlides().get_Item(0);

// add an AutoShape of Rectangle type
IAutoShape ashp = sld.getShapes().addAutoShape(ShapeType.Rectangle, 150, 75, 150, 50);

// add ITextFrame to the Rectangle
ashp.addTextFrame("Hello World");

// change the text color to Black (which is White by default)
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().getFillFormat()
		.setFillType(FillType.Solid);
ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat().getFillFormat()
		.getSolidFillColor().setColor(java.awt.Color.BLACK);

// change the line color of the rectangle to White
ashp.getShapeStyle().getLineColor().setColor(java.awt.Color.WHITE);

// remove any fill formatting in the shape
ashp.getFillFormat().setFillType(FillType.NoFill);

// save the presentation to disk
pres.save(dir + "output.pptx", SaveFormat.Pptx);

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Free Support | Temporary License

You can’t perform that action at this time.