Skip to content

Instantly share code, notes, and snippets.

@sergey-tihon
Created March 15, 2020 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergey-tihon/5daf6d5281f2c997eb53513a463f5d1a to your computer and use it in GitHub Desktop.
Save sergey-tihon/5daf6d5281f2c997eb53513a463f5d1a to your computer and use it in GitHub Desktop.
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