@@ -94,27 +94,22 @@ static void Main ()
94
94
95
95
96
96
/*
97
- // Add slide to an existing presentation
98
- Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample .pptx");
97
+ // change background of a slide of an existing presentation
98
+ Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\test .pptx");
99
99
TextShape shape1 = new TextShape();
100
100
shape1.Text = "Body : Here is my first title From FF";
101
101
shape1.FontFamily = "Baguet Script";
102
102
shape1.TextColor = Colors.Olive;
103
103
shape1.FontSize = 45;
104
104
shape1.Y = 10.0;
105
- // First slide
106
- Slide slide = new Slide();
107
- Image image1 = new Image("D:\\AsposeSampleData\\target.png");
108
- image1.X = Utility.EmuToPixels(1838700);
109
- image1.Y = Utility.EmuToPixels(1285962);
110
- image1.Width = Utility.EmuToPixels(2514600);
111
- image1.Height = Utility.EmuToPixels(2886075);
112
- slide.AddImage(image1);
113
- slide.AddTextShapes(shape1);
114
- presentation.AppendSlide(slide);
115
- presentation.Save();
105
+ Slide slide = presentation.GetSlides()[1];
106
+ slide.BackgroundColor = Colors.Silver;
107
+ slide.Update();
108
+ presentation.Save();
116
109
*/
117
110
111
+
112
+
118
113
/*
119
114
* Update an image in a slide
120
115
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx");
@@ -166,7 +161,7 @@ static void Main ()
166
161
shape1.TextColor = Colors.Yellow;
167
162
shape1.BackgroundColor = Colors.LimeGreen;
168
163
169
- StyledList list = new StyledList();
164
+ StyledList list = new StyledList(FileFormat.Slides.Common.Enumerations.ListType.Bulleted );
170
165
list.AddListItem("Pakistan");
171
166
list.AddListItem("India");
172
167
list.AddListItem("Australia");
@@ -178,6 +173,42 @@ static void Main ()
178
173
presentation.AppendSlide(slide1);
179
174
presentation.Save();
180
175
*/
176
+ /*
177
+ // Add numbered list to an existing presentation
178
+ Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\test.pptx");
179
+ Slide slide = new Slide();
180
+ slide.BackgroundColor = Colors.Teal;
181
+ TextShape shape1 = new TextShape();
182
+ shape1.FontFamily = "Baguet Script";
183
+ shape1.FontSize = 60;
184
+ shape1.Y = 200.0;
185
+ shape1.TextColor = Colors.Yellow;
186
+ shape1.BackgroundColor = Colors.LimeGreen;
187
+
188
+ StyledList list = new StyledList(FileFormat.Slides.Common.Enumerations.ListType.Numbered);
189
+ list.AddListItem("Umar");
190
+ list.AddListItem("Farooq");
191
+ list.AddListItem("Adnan");
192
+ list.AddListItem("Usman");
193
+ list.AddListItem("Numan");
194
+ shape1.TextList = list;
195
+
196
+ slide.AddTextShapes(shape1);
197
+ presentation.AppendSlide(slide);
198
+ presentation.Save();
199
+ */
200
+ /*
201
+ Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\test.pptx");
202
+ Slide slide = presentation.GetSlides()[3];
203
+ TextShape shape = slide.TextShapes[0];
204
+ StyledList list = shape.TextList;
205
+ list.ListItems.RemoveAt(4);
206
+ list.ListItems.RemoveAt(2);
207
+ list.ListType = FileFormat.Slides.Common.Enumerations.ListType.Bulleted;
208
+ list.Update();
209
+
210
+ presentation.Save();
211
+ */
181
212
182
213
183
214
}
0 commit comments