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
// Open an existing presentation | |
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\draw.pptx"); | |
// Create a new slide | |
Slide slide = new Slide(); | |
// Initialize a trapezoid shape with properties | |
Trapezoid trapezoid = new Trapezoid | |
{ | |
Animation = FileFormat.Slides.Common.Enumerations.AnimationType.FlyIn, |
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
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}"); | |
// Create an instance of Arrow | |
Arrow Arrow = new Arrow(); | |
// Set height and widt | |
Arrow.Height = 400.0; | |
// Set Y position | |
Arrow.Y = 100.0; |
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
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}"); | |
// Create an instance of Arrow | |
Arrow Arrow = new Arrow(); | |
// Set height and widt | |
Arrow.Height = 400.0; | |
// Set Y position | |
Arrow.Y = 100.0; |
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
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\draw.pptx"); | |
// Create slide | |
Slide slide = new Slide(); | |
// Create circle object and set it's properties | |
Circle circle = new Circle(); | |
circle.Width = 500.0; | |
circle.X = circle.Width / 2; | |
circle.Y = circle.Height / 2; | |
circle.BackgroundColor = "5f7200"; | |
slide.DrawCircle(circle); |
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
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\draw.pptx"); | |
// Create slide | |
Slide slide = new Slide(); | |
// Create Rectangle object and set it's properties | |
Line line = new Line(); | |
line.Width = 500.0; | |
line.X = line.Width / 2; | |
line.Y = line.Height / 2; | |
line.BackgroundColor = "5f7200"; | |
slide.DrawLine(line); |
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
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\draw.pptx"); | |
// Create slide | |
Slide slide = new Slide(); | |
// Create Rectangle object and set it's properties | |
Rectangle rectangle = new Rectangle(); | |
rectangle.Width = 500.0; | |
rectangle.Height =300.0; | |
rectangle.X = rectangle.Width / 2; | |
rectangle.Y = rectangle.Height / 2; | |
rectangle.BackgroundColor = "5f7200"; |
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
Presentation presentation = Presentation.Open("File_Path"); | |
// 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]; | |
// Remove image | |
image.Remove(); |
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 instance of presentation | |
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}"); | |
// Get desired slide | |
Slide slide = presentation.GetSlides()[0]; | |
// Create a new table | |
Table table = new Table(); | |
// Define table columns | |
TableColumn col1 = new TableColumn(); | |
col1.Name = "ID"; | |
table.Columns.Add(col1); |
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 instance of presentation | |
Presentation presentation = Presentation.Open($"{documentDirectory}/{filename}"); | |
// Get desired slide | |
Slide slide = presentation.GetSlides()[0]; | |
// Set background color | |
slide.BackgroundColor = Colors.Fuchsia; | |
// Update slide | |
slide.Update(); | |
// Save presentation | |
presentation.Save(); |
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
// Open presentation | |
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx"); | |
// Extract images and save it at specified path. | |
presentation.ExtractAndSaveImages("directory_path"); */ |
NewerOlder