Get Started
Documentation

ApiPresentation

new ApiPresentation()

Class representing a presentation.

Methods

Name Description
AddSlide Append a new slide to the end of the presentation.
GetClassType Get the type of this class.
GetCurSlideIndex Get the index for the current slide.
GetCurrentSlide Get the current slide.
GetSlideByIndex Get the slide by its position in the presentation.
SetSizes Set the size for the current presentation.

Example

Copy code
builder.CreateFile("pptx");
var oPresentation = Api.GetPresentation();
oPresentation.SetSizes(254 * 36000, 190 * 36000);
var oSlide = oPresentation.GetCurrentSlide();
oSlide.RemoveAllObjects();
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(255, 224, 204), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(255, 164, 101), 100000);
oFill = Api.CreateRadialGradientFill([oGs1, oGs2]);
oSlide.SetBackground(oFill);
builder.SaveFile("pptx", "ApiPresentation.pptx");
builder.CloseFile();

Resulting document