In details, selection gets cleared after saving the pptx.
I tried with no manipulation at all and it seems like the issue is there as well.
Sample code, basically opening, cloning and saving
- Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile(@"countries.pptx");
var finalPpt = new Presentation();
foreach (var slide in ppt.Slides)
{
finalPpt.SlideSize.Type = ppt.SlideSize.Type;
var generatedSlide = ppt.Slides[0];
finalPpt.Slides.Append(generatedSlide);
}
finalPpt.SaveToFile(@"C:\tmp\countriesout.pptx", FileFormat.Pptx2013);
I am sending a wetransfer link with original pptx, pre and post screens after saving (I had to upload a zip with wetransfer link, pptx template is 8Mb )
Original template has selection set, while produced one hasn't. However, if I manually set the selection in the produced pptx graph gets rendered correctly.
Is this graph type not supported? Anything wrong in what I am doing?
Thanks,
Regards
Andrea