Features and Capabilities

Features and Capabilities

Features and Capabilities

Aspose.Slides FOSS for .NET provides a broad set of capabilities for working with PowerPoint .pptx files programmatically. This page lists all supported feature areas with representative code examples.


Presentation I/O

Open an existing .pptx file or create a new one, then save back to PPTX format.

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

// Open an existing presentation
using (var prs = new Presentation("input.pptx"))
{
    Console.WriteLine($"Slide count: {prs.Slides.Count}");
    prs.Save("output.pptx", SaveFormat.Pptx);
}

// Create a new presentation (starts with one blank slide)
using (var prs = new Presentation())
{
    prs.Save("new.pptx", SaveFormat.Pptx);
}

Note: PPTX is the only supported save format in this FOSS edition. The save call serializes the full presentation object graph to the OOXML container.

Unknown XML parts in the source file are preserved verbatim on save, so opening and re-saving a .pptx will never strip content the library does not yet understand.


Slides Management

Use prs.Slides to add empty slides with AddEmptySlide(), remove existing ones, or check the total slide count:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
// Access the first slide
var slide = prs.Slides[0];

// Add an additional blank slide at the end
prs.Slides.AddEmptySlide(prs.LayoutSlides[0]);

Console.WriteLine($"Total slides: {prs.Slides.Count}");
prs.Save("multi-slide.pptx", SaveFormat.Pptx);

Shapes

Add AutoShapes, PictureFrames, Tables, and Connectors to a slide.

AutoShapes

Call slide.Shapes.AddAutoShape() with a ShapeType, position, and size, then call AddTextFrame() to set the text content:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var slide = prs.Slides[0];
// Add a rectangle at (x=50, y=50) with width=300, height=100
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 300, 100);
shape.AddTextFrame("Aspose.Slides FOSS");
prs.Save("shapes.pptx", SaveFormat.Pptx);

Tables

Use slide.Shapes.AddTable() with column widths and row heights to create a grid, then access cells via table.Rows[row][col]:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var slide = prs.Slides[0];
// Column widths and row heights in points
double[] colWidths = { 120.0, 120.0, 120.0 };
double[] rowHeights = { 40.0, 40.0, 40.0 };
var table = slide.Shapes.AddTable(50, 50, colWidths, rowHeights);
table.Rows[0][0].TextFrame.Text = "Product";
table.Rows[0][1].TextFrame.Text = "Quantity";
table.Rows[0][2].TextFrame.Text = "Price";
prs.Save("table.pptx", SaveFormat.Pptx);

Connectors

Call slide.Shapes.AddConnector() and set StartShapeConnectedTo and EndShapeConnectedTo to wire two shapes with a connector line:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var slide = prs.Slides[0];
var box1 = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 100, 150, 60);
var box2 = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 350, 100, 150, 60);
var conn = slide.Shapes.AddConnector(ShapeType.BentConnector3, 0, 0, 10, 10);
conn.StartShapeConnectedTo = box1;
conn.StartShapeConnectionSiteIndex = 3;  // right side
conn.EndShapeConnectedTo = box2;
conn.EndShapeConnectionSiteIndex = 1;    // left side
prs.Save("connector.pptx", SaveFormat.Pptx);

Text Formatting

Access PortionFormat on each TextPortion to set font height, bold, italic, and fill color at the character level:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Drawing;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var slide = prs.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 500, 150);
var tf = shape.AddTextFrame("Bold blue heading");

var fmt = tf.Paragraphs[0].Portions[0].PortionFormat;
fmt.FontHeight = 28;
fmt.FontBold = NullableBool.True;
fmt.FillFormat.FillType = FillType.Solid;
fmt.FillFormat.SolidFillColor.Color = Color.FromArgb(255, 0, 70, 127);

prs.Save("text.pptx", SaveFormat.Pptx);

NullableBool.True sets the property explicitly; NullableBool.NotDefined inherits from the slide master.


Fill Types

Set shape.FillFormat.FillType to FillType.Solid and configure the fill color via SolidFillColor.Color using an ARGB value:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Drawing;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var slide = prs.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 300, 150);

// Solid fill
shape.FillFormat.FillType = FillType.Solid;
shape.FillFormat.SolidFillColor.Color = Color.FromArgb(255, 30, 120, 200);

prs.Save("fill.pptx", SaveFormat.Pptx);

Visual Effects

Apply outer shadow, glow, soft edge, blur, reflection, and inner shadow to shapes.

The effect properties are accessible through shape.EffectFormat. Call EnableOuterShadowEffect(), EnableGlowEffect(), EnableSoftEdgeEffect(), SetBlurEffect(), EnableReflectionEffect(), or EnableInnerShadowEffect() to configure each independently.


3D Formatting

Apply 3D bevel, camera, light rig, material, and extrusion depth via shape.ThreeDFormat. This controls the visual depth and lighting model for shape rendering in PPTX viewers that support 3D effects.


Speaker Notes

Access NotesSlideManager on any slide and call AddNotesSlide() to create a notes page, then set the notes text directly:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var notes = prs.Slides[0].NotesSlideManager.AddNotesSlide();
notes.NotesTextFrame.Text = "Key talking point: emphasize the ROI benefit.";
prs.Save("notes.pptx", SaveFormat.Pptx);

Comments

Create a comment author with prs.CommentAuthors.AddAuthor(), then call author.Comments.AddComment() with the slide and position coordinates:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Drawing;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var author = prs.CommentAuthors.AddAuthor("Jane Smith", "JS");
var slide = prs.Slides[0];
author.Comments.AddComment(
    "Please verify this data before the presentation.",
    slide,
    new PointF(2.0f, 2.0f),
    DateTime.Now
);
prs.Save("comments.pptx", SaveFormat.Pptx);

Embedded Images

Embed an image from a file into the presentation and add it to a slide as a PictureFrame.

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var imageData = File.ReadAllBytes("logo.png");
var image = prs.Images.AddImage(imageData);
var slide = prs.Slides[0];
slide.Shapes.AddPictureFrame(ShapeType.Rectangle, 50, 50, 200, 150, image);
prs.Save("with-image.pptx", SaveFormat.Pptx);

Document Properties

Access prs.DocumentProperties to read or write standard properties such as title, author, and subject, plus custom key-value pairs:

using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var props = prs.DocumentProperties;

// Core properties
props.Title = "Q1 Results";
props.Author = "Finance Team";
props.Subject = "Quarterly Review";
props.Keywords = "Q1, finance, results";

// Custom property
props.SetCustomPropertyValue("ReviewedBy", "Legal Team");

prs.Save("deck.pptx", SaveFormat.Pptx);

Known Limitations

The following areas are not implemented in the FOSS edition:

AreaStatus
ChartsNot implemented
SmartArtNot implemented
Animations and transitionsNot implemented
PDF / HTML / SVG / image exportNot implemented (PPTX only)
VBA macrosNot implemented
Digital signaturesNot implemented
Hyperlinks and action settingsNot implemented
OLE objectsNot implemented
Mathematical textNot implemented

See Also

 English