builder.CreateFile("pptx");
var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
if(!oSlide){
oSlide = Api.CreateSlide();
oPresentation.AddSlide(oSlide);
}
oPresentation.SetSizes(12192000, 6858000);
var oFill = Api.CreateBlipFill("https://www.onlyoffice.com/images/landing/document-builder/presentation1.jpg", "stretch");
oSlide.SetBackground(oFill);
oSlide.RemoveAllObjects();
var oShape = Api.CreateShape('rect', 1920*3600, 850*3600, Api.CreateNoFill(), Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(1183470, 1647320);
var oContent = oShape.GetDocContent();
var oParagraph = oContent.GetElement(0);
oParagraph.SetSpacingBefore(0, undefined);
oParagraph.SetSpacingAfter(0, undefined);
oParagraph.SetSpacingLine(9 * 24, "auto");
var oRun = oParagraph.AddText('Smooth presentation creation');
oRun.SetFill(Api.CreateSolidFill(Api.CreateRGBColor(255,230,201)));
oRun.SetFontSize(144);
oRun.SetFontFamily('Arial');
oRun.SetBold(true);
oSlide.AddObject(oShape);
oSlide = Api.CreateSlide();
oPresentation.AddSlide(oSlide);
oFill = Api.CreateBlipFill("https://www.onlyoffice.com/images/landing/document-builder/presentation2.jpg", "stretch");
oSlide.SetBackground(oFill);
oSlide.RemoveAllObjects();
oShape = Api.CreateShape('rect', 881*3600, 360*3600, Api.CreateNoFill(), Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(723232, 4744282);
oContent = oShape.GetDocContent();
oParagraph = oContent.GetElement(0);
oParagraph.SetSpacingBefore(0, undefined);
oParagraph.SetSpacingAfter(0, undefined);
oParagraph.SetSpacingLine(9 * 24, "auto");
oRun = oParagraph.AddText('Add and manage slides, set their background.');
oRun.SetFill(Api.CreateSolidFill(Api.CreateRGBColor(255,255,255)));
oRun.SetFontSize(44);
oRun.SetFontFamily('Arial');
oSlide.AddObject(oShape);
oShape = Api.CreateShape('rect', 928*3600, 389*3600, Api.CreateNoFill(), Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(4460660, 4744282);
oContent = oShape.GetDocContent();
oParagraph = oContent.GetElement(0);
oParagraph.SetSpacingBefore(0, undefined);
oParagraph.SetSpacingAfter(0, undefined);
oParagraph.SetSpacingLine(9 * 24, "auto");
oRun = oParagraph.AddText('Create shapes, charts, insert images. Format text in shapes and paragraphs.');
oRun.SetFill(Api.CreateSolidFill(Api.CreateRGBColor(255,255,255)));
oRun.SetFontSize(44);
oRun.SetFontFamily('Arial');
oSlide.AddObject(oShape);
oShape = Api.CreateShape('rect', 810*3600, 417*3600, Api.CreateNoFill(), Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(8432224, 4744282);
oContent = oShape.GetDocContent();
oParagraph = oContent.GetElement(0);
oParagraph.SetSpacingBefore(0, undefined);
oParagraph.SetSpacingAfter(0, undefined);
oParagraph.SetSpacingLine(9 * 24, "auto");
oRun = oParagraph.AddText('Use the Gradient, Solid or Pattern Fill option.');
oRun.SetFill(Api.CreateSolidFill(Api.CreateRGBColor(255,255,255)));
oRun.SetFontSize(44);
oRun.SetFontFamily('Arial');
oSlide.AddObject(oShape);
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(255,219,178), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(240,173,173), 100000);
oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 13500000);
oShape = Api.CreateShape('rect', 374*3600, 221*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(1901130, 2765280);
oSlide.AddObject(oShape);
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(161,232,255), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(135,209,232), 100000);
oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 13500000);
oShape = Api.CreateShape('rect', 374*3600, 221*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(1464940, 2411390);
oSlide.AddObject(oShape);
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(57,151,219), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(0,112,192), 100000);
oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 13500000);
oShape = Api.CreateShape('rect', 374*3600, 221*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(995830, 2016350);
oSlide.AddObject(oShape);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(255,255,204));
oShape = Api.CreateShape('mathPlus', 95*3600, 95*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(1497860, 2246790);
oSlide.AddObject(oShape);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(255,255,204));
oShape = Api.CreateShape('rect', 240*3600, 467*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(6337100, 1901130);
oSlide.AddObject(oShape);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(255,181,181));
oShape = Api.CreateShape('rect', 231*3600, 366*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(5802150, 2263250);
oSlide.AddObject(oShape);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(161,232,255));
oShape = Api.CreateShape('rect', 251*3600, 250*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(5275430, 2682980);
oSlide.AddObject(oShape);
oFill = Api.CreateSolidFill(Api.CreateRGBColor(0,112,192));
oShape = Api.CreateShape('rect', 177*3600, 144*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(4929770, 3061560);
oSlide.AddObject(oShape);
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(242,242,172), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(240,173,173), 100000);
oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 0);
oShape = Api.CreateShape('blockArc', 706*3600, 706*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(8583890, 2362010);
oSlide.AddObject(oShape);
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(0,112,192), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(135,209,232), 100000);
oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 0);
oShape = Api.CreateShape('blockArc', 530*3600, 530*3600, oFill, Api.CreateStroke(0, Api.CreateNoFill()));
oShape.SetPosition(8913090, 2680000);
oSlide.AddObject(oShape);
builder.SaveFile("pptx", "samplepresentation.pptx");
builder.CloseFile();