Developer Guide
This guide covers the core capabilities of Aspose.Slides FOSS for Java with runnable code examples for each feature area.
In This Section
| Page | Description |
|---|---|
| Features and Capabilities | Full list of supported features: slides, shapes, text, fill, effects, 3D formatting, notes, comments, images, and document properties. |
| Working with Images | Embed images into slides as picture frames from file or bytes; control fill mode (stretch, tile). |
| Working with Connectors | Add bent, elbow, and straight connectors between shapes; set connection sites and line style. |
| Working with 3D Effects | Apply outer shadow, glow, blur, bevel, camera presets, light rigs, and materials to shapes. |
| Working with Comments | Add threaded review comments and speaker notes; manage comment authors; read annotations. |
API Entry Point
Every operation starts with a Presentation object. Always use it inside a try-with-resources block:
import org.aspose.slides.foss.Presentation;
import org.aspose.slides.foss.export.SaveFormat;
// Open existing
try (Presentation prs = new Presentation("input.pptx")) {
// work with prs
prs.save("output.pptx", SaveFormat.PPTX);
}
// Create new
try (Presentation prs = new Presentation()) {
// work with prs
prs.save("new.pptx", SaveFormat.PPTX);
}The try-with-resources block ensures that internal XML resources are released when the block exits. Do not store a Presentation reference outside of the try block.
Supported Output Format
The only supported save format is PPTX (SaveFormat.PPTX). Export to PDF, HTML, SVG, or image formats is not available in this edition.
Key Classes
| Class / Enum | Package | Description |
|---|---|---|
Presentation | org.aspose.slides.foss | Root container; use in try-with-resources |
ShapeType | org.aspose.slides.foss | Enum for shape types (RECTANGLE, ELLIPSE, …) |
FillType | org.aspose.slides.foss | Enum for fill types (SOLID, GRADIENT, …) |
NullableBool | org.aspose.slides.foss | Tri-state bool for formatting (TRUE, FALSE, NOT_DEFINED) |
SaveFormat | org.aspose.slides.foss.export | Output format enum (only PPTX supported) |
Color | org.aspose.slides.foss.drawing | ARGB color constructor |
PointF | org.aspose.slides.foss.drawing | Float 2D point (used for comment positions) |
Known Limitations
The following areas raise UnsupportedOperationException in this edition:
- Charts: no chart creation or modification
- SmartArt: not supported
- Animations and transitions: slide transitions and object animations cannot be set
- Export formats: only PPTX save is supported; no PDF, HTML, SVG, or image export
- Hyperlinks and action settings: link objects are not modifiable
- VBA macros and digital signatures: not accessible
Unknown XML parts encountered during load are preserved verbatim on save, so round-tripping never removes content the library does not yet understand.
See Also
- Getting Started: Installation and first program
- API Reference: Class and method reference
- How-To Guides: Task-oriented how-to articles