It cannot find any placeholders.
for (int i = 0; i < slide.Placeholders.Count; i++)
.....
Always returns 0... it never gets into the loop. What wrong?
The powerpoint file is attached.
This is the code I have, which for the most part came from the help docs.
When I flush the file out I get the template as it is, with out any changes so I know it is reading the correct file.
It does the same thing if I read it form the file system.
The example seems simple enough put it is not working.
/////////////////////////////////////
Library.File file = new Library.File("406cfd37-8237-42d9-8dd4-11a4d34921f3");
byte[] data = Library.File.GetContentDataByFile(file);MemoryStream ms = new MemoryStream(data, 0, data.Length);
Stream mystream = ms;
Presentation pres = new Presentation(mystream);
//License lic = new License();
//lic.SetLicense("Aspose.Slides.Lic");
Slide slide = pres.Slides[0];
TextHolder th = null;
for (int i = 0; i < slide.Placeholders.Count; i++)
{
th = (TextHolder)slide.Placeholders[i];
if (th.Text.ToLower().Equals("test.author"))
{
th.Paragraphs[0].Portions[0].Text = "My Test Title";
}
}
return pres;
////////////////////////////////////////////////////////////////////////////////