Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fileformat-slides-gists/35457af944ddde5068b8161c415d914d to your computer and use it in GitHub Desktop.
Save fileformat-slides-gists/35457af944ddde5068b8161c415d914d to your computer and use it in GitHub Desktop.
How to Add Pictures to PowerPoint PPT PPTX Slides | FileFormat.Slides
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}");
// Get Slides
var slides = presentation.GetSlides();
var slide = slides[1];
// Get Images from slide
List<Image> images = slide.Images;
// Choose desired image
var image = slide.Images[0];
// Set xAxis
image.X = xAxis;
// Set yAxis
image.Y = yAxis;
// Update image
image.Update();
// Save presentation
presentation.Save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment