Skip to content

Commit

Permalink
Publish v23.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadumargroupdocs committed Dec 20, 2023
1 parent ea939a3 commit 2bb25cc
Show file tree
Hide file tree
Showing 12 changed files with 712 additions and 424 deletions.
76 changes: 73 additions & 3 deletions FileFormat.Slides-Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Program
{
static void Main ()
{
{
/* Create new Presentation
Presentation presentation = Presentation.Create("D:\\AsposeSampleResults\\test2.pptx");
TextShape shape = new TextShape();
Expand All @@ -34,7 +34,32 @@ static void Main ()
presentation.AppendSlide(slide);
presentation.AppendSlide(slide1);
presentation.Save();*/
/*
Presentation presentation = Presentation.Create("D:\\AsposeSampleResults\\test2.pptx");
TextShape shape = new TextShape();
shape.Text = "Title: Here is my first title From FF";
shape.BackgroundColor = "5f7200";
shape.FontSize = 80;
shape.TextColor = "980078";
shape.FontFamily = "Baguet Script";
TextShape shape2 = new TextShape();
shape2.BackgroundColor = "ff7f90";
List<TextSegment> TextSegments = new List<TextSegment>();
TextSegments.Add(new TextSegment{Color= "980078", FontSize = 70, FontFamily = "Calibri", Text = "Body:" }.create());
TextSegments.Add(new TextSegment{ Color = "000000", FontSize = 32, FontFamily = "Baguet Script", Text = " Here is my text Segment" }.create());
shape2.Y = Utility.EmuToPixels(3499619);
// First slide
Slide slide = new Slide();
slide.AddTextShapes(shape);
slide.AddTextShapes(shape2, TextSegments);
// Adding slides
presentation.AppendSlide(slide);
presentation.Save();*/

/* Open and update a PPTX file
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx");
var slides = presentation.GetSlides();
Expand All @@ -56,7 +81,7 @@ static void Main ()
Console.WriteLine(confirmation);
presentation.Save();
*/

/*
* Remove text shape from a slide
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx");
Expand All @@ -69,7 +94,7 @@ static void Main ()


/*
* Add slide to an existing presentation
// Add slide to an existing presentation
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx");
TextShape shape1 = new TextShape();
shape1.Text = "Body : Here is my first title From FF";
Expand Down Expand Up @@ -108,6 +133,51 @@ static void Main ()
presentation.ExtractAndSaveImages("testing images"); */


/*
//Update an image in a slide
Presentation presentation = Presentation.Open("D:\\AsposeSampleData\\sample.pptx");
var slides = presentation.GetSlides();
var slide = slides[0];
var shape = slide.TextShapes[0];
shape.BackgroundColor = "7f7f88";
shape.Text = "Updated 2nd Text";
shape.Update();
Slide slide1 = new Slide();
slide1.BackgroundColor = Colors.Green;
Image image1 = new Image("D:\\AsposeSampleData\\target.png");
image1.X = Utility.EmuToPixels(1838700);
image1.Y = Utility.EmuToPixels(1285962);
image1.Width = Utility.EmuToPixels(2514600);
image1.Height = Utility.EmuToPixels(2886075);
slide1.AddImage(image1);
presentation.AppendSlide(slide1);
presentation.Save();
*/
/*
* Add bulleted list.
Presentation presentation = Presentation.Create("D:\\AsposeSampleResults\\test2.pptx");
Slide slide1 = new Slide();
slide1.BackgroundColor = Colors.Purple;
TextShape shape1 = new TextShape();
shape1.FontFamily = "Baguet Script";
shape1.FontSize = 60;
shape1.Y = 200.0;
shape1.TextColor = Colors.Yellow;
shape1.BackgroundColor = Colors.LimeGreen;
StyledList list = new StyledList();
list.AddListItem("Pakistan");
list.AddListItem("India");
list.AddListItem("Australia");
list.AddListItem("England");
shape1.TextList = list;
slide1.AddTextShapes(shape1);
presentation.AppendSlide(slide1);
presentation.Save();
*/


}
Expand Down
Loading

0 comments on commit 2bb25cc

Please sign in to comment.