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 = rectangle.Width / 2; | |
line.Y = rectangle.Height / 2; | |
line.BackgroundColor = "5f7200"; | |
slide.DrawRectangle(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"); */ |
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); |
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}"); | |
// 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; |
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.Create($"{documentDirectory}/{filename}"); | |
// Create slide | |
Slide slide = new Slide(); | |
// Set background color of slide because default background color is black. | |
slide.BackgroundColor = Colors.Silver; | |
// Adding slides | |
presentation.AppendSlide(slide); | |
// Save presentation | |
presentation.Save(); |