Hi Guys
I get an error when I try to work with the slide (orig_Slide7). When I get it back from Aspose.Slides I can see the purple background but it is sized in correctly (error_Slide7)
Here is the code I am using :
Aspose.Slides.Presentation parent = null;
parent = new Aspose.Slides.Presentation(stream);
for (int i = 0; i < parent.Slides.LastSlidePosition; i++)
{
string targetFileName = path + i.ToString();
//Issue with index v slide position, try to access by position instead
Aspose.Slides.Slide parentSlide = parent.GetSlideByPosition(i + 1);
Aspose.Slides.Presentation child = new Aspose.Slides.Presentation();
child.SlideSize = new System.Drawing.Size(parentWidth, parentHeight);
parent.CloneSlide(parentSlide, 0, child, new System.Collections.SortedList());
if (child.Slides.LastSlidePosition > 1)
{
//remove default slide added during instantiation of presentation
child.Slides.RemoveAt(0);
child.DeleteUnusedMasters();
//address potential header footer issue that is documented
HeaderFooter parentHeadFoot = parentSlide.HeaderFooter;
HeaderFooter childHeadFoot = child.Slides[0].HeaderFooter;
//Assigning the visibility information (about header, footer,
//page number, date/time) of source slide to destination slide
childHeadFoot.IsHeaderVisible = parentHeadFoot.IsHeaderVisible;
childHeadFoot.IsFooterVisible = parentHeadFoot.IsFooterVisible;
childHeadFoot.IsPageNumberVisible = parentHeadFoot.IsPageNumberVisible;
childHeadFoot.IsDateTimeVisible = parentHeadFoot.IsDateTimeVisible;
childHeadFoot.IsDateTimeFixed = parentHeadFoot.IsDateTimeFixed;
childHeadFoot.IsShowOnTitleSlide = parentHeadFoot.IsShowOnTitleSlide;
//save presentation
child.Write(targetFileName + Presentation.PowerPointAppend);
}
}
Any thoughts ?
Guyan -- (3.0.1.35473)