Created
April 16, 2024 15:52
-
-
Save fileformat-slides-gists/8442d81ed3015e4afa08af12e1277901 to your computer and use it in GitHub Desktop.
How to Add Text to a Slide Programmatically using C# Open-Source API | FileFormat.Slides
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create an instance of new presentation | |
Presentation presentation = Presentation.Create($"{documentDirectory}/{filename}"); | |
// Create an instance of TextShape | |
TextShape shape = new TextShape(); | |
// Set text of the TextShape | |
shape.Text = "FileFormat.Slides Text Shape Example"; | |
// Create Slide | |
Slide slide = new Slide(); | |
// Add text shapes. | |
slide.AddTextShapes(shape); | |
// Add slide to the presentation | |
presentation.AppendSlide(slide); | |
// Save presentation | |
presentation.Save(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment