Skip to content

Commit d869232

Browse files
committed the changes for the remaining samples
1 parent 5edf64f commit d869232

57 files changed

Lines changed: 182 additions & 299 deletions

File tree

  • Sections
    • Add-existing-slide-in-PowerPoint-section/.NET/Add-existing-slide-in-PowerPoint-section
    • Add-new-slide-in-PowerPoint-section/.NET/Add-new-slide-in-PowerPoint-section
    • Clone-and-merge-section-slides/.NET/Clone-and-merge-section-slides
    • Insert-section-in-PowerPoint/.NET/Insert-section-in-PowerPoint
    • Move-section-positions/.NET/Move-section-positions
    • Move-slide-within-section/.NET/Move-slide-within-section
    • Remove-all-sections/.NET/Remove-all-sections
    • Remove-section/.NET/Remove-section
  • Security
    • Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password
    • Remove-encryption/.NET/Remove-encryption
    • Remove-write-protection/.NET/Remove-write-protection
    • Set-write-protection/.NET/Set-write-protection
  • Shapes
    • Add-PowerPoint-shape/.NET/Add-PowerPoint-shape
    • Apply-shape-properties/.NET/Apply-shape-properties
    • Create-PowerPoint-groupshape/.NET/Create-PowerPoint-groupshape
    • Iterate-groupshape-and-modify-a-shape/.NET/Iterate-groupshape-and-modify-a-shape
    • Iterate-through-shapes/.NET/Iterate-through-shapes
    • Remove-groupshape/.NET/Remove-groupshape
    • Remove-shape/.NET/Remove-shape
  • Slide-transitions
    • Apply-PowerPoint-slide-transition/.NET/Apply-PowerPoint-slide-transition
    • Modify-transition-effect/.NET/Modify-transition-effect
    • Set-transition-delay/.NET/Set-transition-delay
    • Set-transition-duration/.NET/Set-transition-duration
    • Set-transition-speed/.NET/Set-transition-speed
    • Set-trigger-mode-for-transition/.NET/Set-trigger-mode-for-transition
  • Slides
    • Add-PowerPoint-slide/.NET/Add-PowerPoint-slide
    • Add-all-predefined-slide-layout-types/.NET/Add-all-predefined-slide-layout-types
    • Add-predefined-blank-slide-layout-type/.NET/Add-predefined-blank-slide-layout-type
    • Add-slide-with-existing-slide-layout/.NET/Add-slide-with-existing-slide-layout
    • Clone-PowerPoint-slide/.NET/Clone-PowerPoint-slide
    • Create-and-use-custom-layout-slide/.NET/Create-and-use-custom-layout-slide
    • Iterate-slide-elements/.NET/Iterate-slide-elements
    • Merge-PowerPoint-slide-with-Source-formatting/.NET/Merge-PowerPoint-slide-with-Source-formatting
    • Merge-PowerPoint-slide/.NET/Merge-PowerPoint-slide
    • Remove-PowerPoint-slide/.NET/Remove-PowerPoint-slide
    • Set-SlideSize-to-destination-slides/Set-SlideSize-to-destination-slides
  • SmartArts
    • Add-PowerPoint-SmartArt/.NET/Add-PowerPoint-SmartArt
    • Add-SmartArt-node/.NET/Add-SmartArt-node
    • Adding-nested-level-nodes/.NET/Adding-nested-level-nodes
    • Iterate-child-nodes-of-existing-SmartArt/.NET/Iterate-child-nodes-of-existing-SmartArt
    • Modify-SmartArt-appearance/.NET/Modify-SmartArt-appearance
    • Remove-child-node-from-existing-SmartArt/.NET/Remove-child-node-from-existing-SmartArt
  • Tables
    • Add-new-column-to-the-table-end/.NET/Add-new-column-to-the-table-end
    • Add-new-row-to-the-table-end/.NET/Add-new-row-to-the-table-end
    • Apply-table-formatting/.NET/Apply-table-formatting
    • Apply-table-styles/.NET/Apply-table-styles
    • Copy-existing-column-to-the-table-end/.NET/Copy-existing-column-to-the-table-end
    • Copy-existing-row-to-the-table-end/.NET/Copy-existing-row-to-the-table-end
    • Create-PowerPoint-table-with-columns/.NET/Create-PowerPoint-table-with-columns
    • Create-PowerPoint-table-with-rows/.NET/Create-PowerPoint-table-with-rows
    • Edit-table-contents/.NET/Edit-table-contents
    • Get-actual-table-height/.NET/Get-actual-table-height
    • Insert-column-in-table/.NET/Insert-column-in-table
    • Insert-row-in-table/.NET/Insert-row-in-table
    • Merge-table-cells/.NET/Merge-table-cells
    • Modify-existing-table/.NET/Modify-existing-table
    • Remove-table/.NET/Remove-table

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
using IPresentation pptxDoc = Presentation.Open(inputStream);
4+
using IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Create a new section in the PowerPoint presentation.
86
pptxDoc.Sections.Add();
97
//Move the first slide to the created section.
108
pptxDoc.Slides[0].MoveToSection(0);
11-
//Save the PowerPoint Presentation as stream.
12-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
13-
pptxDoc.Save(outputStream);
9+
//Save the PowerPoint Presentation
10+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));

Sections/Add-new-slide-in-PowerPoint-section/.NET/Add-new-slide-in-PowerPoint-section/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
ISlide slide = section.AddSlide(SlideLayoutType.Blank);
1111
//Add a text box to the slide.
1212
slide.AddTextBox(10, 10, 150, 100).TextBody.AddParagraph("Slide in SectionDemo");
13-
//Save the PowerPoint Presentation as stream.
14-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
15-
pptxDoc.Save(outputStream);
13+
//Save the PowerPoint Presentation
14+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
IPresentation pptxDoc = Presentation.Open(inputStream);
4+
IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Clone the slides in 3rd section.
86
ISlides slides = pptxDoc.Sections[2].Clone();
97
//Create a destination PowerPoint presentation instance. Existing presentations can also be used here.
108
pptxDoc = Presentation.Create();
119
//Iterate the cloned slides and adds the slides to the destination presentation.
1210
foreach (ISlide slide in slides)
1311
pptxDoc.Slides.Add(slide);
14-
//Save the PowerPoint Presentation as stream.
15-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
16-
pptxDoc.Save(outputStream);
12+
//Save the PowerPoint Presentation
13+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));
1714
pptxDoc.Close();
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
using IPresentation pptxDoc = Presentation.Open(inputStream);
4+
using IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Create a new section to Insert.
86
ISection section = pptxDoc.Sections.Add();
97
//Name the created section.
@@ -12,7 +10,6 @@
1210
pptxDoc.Sections.Insert(1, section);
1311
//Remove the unwanted created section.
1412
pptxDoc.Sections.RemoveAt(pptxDoc.Sections.Count - 1);
15-
//Save the PowerPoint Presentation as stream
16-
using FileStream outputStream = new(Path.GetFullPath("Output/Section.pptx"), FileMode.Create, FileAccess.ReadWrite);
17-
pptxDoc.Save(outputStream);
13+
//Save the PowerPoint Presentation
14+
pptxDoc.Save(Path.GetFullPath(@"Output/Section.pptx"));
1815
pptxDoc.Close();
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
using IPresentation pptxDoc = Presentation.Open(inputStream);
4+
using IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Move the second section to third position within the PowerPoint presentation.
86
pptxDoc.Sections[1].Move(3);
9-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
10-
pptxDoc.Save(outputStream);
7+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
using IPresentation pptxDoc = Presentation.Open(inputStream);
4+
using IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Get the first slide of second section in the PowerPoint presentation.
86
ISlide slide = pptxDoc.Sections[1].Slides[0];
97
//Move the slide to first section.
108
slide.MoveToSection(0);
11-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
12-
pptxDoc.Save(outputStream);
9+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
IPresentation pptxDoc = Presentation.Open(inputStream);
4+
IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Remove the sections.
86
pptxDoc.Sections.Clear();
9-
//Save the PowerPoint Presentation as stream.
10-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
11-
pptxDoc.Save(outputStream);
7+
//Save the PowerPoint Presentation
8+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));
129
pptxDoc.Close();
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing PowerPoint presentation.
6-
IPresentation pptxDoc = Presentation.Open(inputStream);
4+
IPresentation pptxDoc = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
75
//Remove the second section from the PowerPoint presentation.
86
pptxDoc.Sections.Remove(pptxDoc.Sections[1]);
9-
//Save the PowerPoint Presentation as stream.
10-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
11-
pptxDoc.Save(outputStream);
7+
//Save the PowerPoint Presentation
8+
pptxDoc.Save(Path.GetFullPath(@"Output/Result.pptx"));
129
pptxDoc.Close();
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using Syncfusion.Presentation;
22

33
//Open an existing presentation.
4-
using FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read);
5-
using IPresentation presentation = Presentation.Open(inputStream);
4+
using IPresentation presentation = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"));
65
//Encrypt the presentation with a password.
76
presentation.Encrypt("syncfusion");
8-
using FileStream outputStream = new (Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
9-
presentation.Save(outputStream);
7+
presentation.Save(Path.GetFullPath(@"Output/Result.pptx"));
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using Syncfusion.Presentation;
22

3-
//Load or open an PowerPoint Presentation.
4-
using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
53
//Open an existing Presentation from file system and it can be decrypted by using the provided password.
6-
using IPresentation presentation = Presentation.Open(inputStream, "syncfusion");
4+
using IPresentation presentation = Presentation.Open(Path.GetFullPath(@"Data/Template.pptx"), "syncfusion");
75
//Decrypt the document.
86
presentation.RemoveEncryption();
9-
using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite);
10-
presentation.Save(outputStream);
7+
presentation.Save(Path.GetFullPath(@"Output/Result.pptx"));

0 commit comments

Comments
 (0)