As we know, each element of a slide has a unique id. There is any APIs of Spire.Presentation which allows get shape by id?
As shown in the example, I wanna get SlidePicture which has id=5.
Presentation PPT = new Presentation();
PPT.LoadFromFile("Input.pptx");
foreach (IShape s in PPT.Slides[0].Shapes)
{
if (s is SlidePicture)
{
SlidePicture ps = s as SlidePicture;
if (ps.Name == "Picture 4")
{
//...
}
}
}
PPT.SaveToFile("output.pptx", Spire.Presentation.FileFormat.Pptx2013);