SetSizes
Set the size for the current presentation.
Parameters:
Name |
Type |
Description |
nWidth |
EMU
|
The presentation width in English measure units. |
nHeight |
EMU
|
The presentation height in English measure units. |
Returns:
-
This method doesn't return any data.
Example
Copy code
builder.CreateFile("pptx");
oPresentation = Api.GetPresentation();
oPresentation.SetSizes(254 * 36000, 190 * 36000);
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", "SetSizes.pptx");
builder.CloseFile();
Resulting document