Skip to content

Instantly share code, notes, and snippets.

@sergey-tihon

sergey-tihon/Clippit-101.cs Secret

Created Mar 15, 2020
Embed
What would you like to do?
Clippit Intro
var presentation = new PmlDocument(sourceFile);
// Pubslish slides
var slides = PresentationBuilder.PublishSlides(presentation).ToList();
// Save slides into files
foreach (var slide in slides)
{
var targetPath = Path.Combine(targetDir, Path.GetFileName(slide.FileName))
slide.SaveAs(targetPath);
}
// Compose slides back into one presentation
var sources = slides.Select(x => new SlideSource(x, keepMaster:true)).ToList();
PresentationBuilder.BuildPresentation(sources)
.SaveAs(newFileName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment