diff --git a/Animations/Add-animation-effect-to-PowerPoint-shapes/.NET/Add-animation-effect-to-PowerPoint-shapes/Output/Output.pptx b/Animations/Add-animation-effect-to-PowerPoint-shapes/.NET/Add-animation-effect-to-PowerPoint-shapes/Output/Output.pptx new file mode 100644 index 00000000..72bb295f Binary files /dev/null and b/Animations/Add-animation-effect-to-PowerPoint-shapes/.NET/Add-animation-effect-to-PowerPoint-shapes/Output/Output.pptx differ diff --git a/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart.sln b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart.sln new file mode 100644 index 00000000..455b39bc --- /dev/null +++ b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Create-simple-pie-chart", "Create-simple-pie-chart\Create-simple-pie-chart.csproj", "{FC263D1D-3AA3-4B8E-B158-B02C0FF627CB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FC263D1D-3AA3-4B8E-B158-B02C0FF627CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC263D1D-3AA3-4B8E-B158-B02C0FF627CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC263D1D-3AA3-4B8E-B158-B02C0FF627CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC263D1D-3AA3-4B8E-B158-B02C0FF627CB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C73989D0-3A0F-40E1-9FAA-E04EB4173B7A} + EndGlobalSection +EndGlobal diff --git a/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Create-simple-pie-chart.csproj b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Create-simple-pie-chart.csproj new file mode 100644 index 00000000..11eedb85 --- /dev/null +++ b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Create-simple-pie-chart.csproj @@ -0,0 +1,19 @@ + + + + Exe + net8.0 + Create_simple_pie_chart + enable + enable + + + + + + + + Always + + + diff --git a/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/.gitkeep b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/.gitkeep new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/.gitkeep @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/Result.pptx b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/Result.pptx new file mode 100644 index 00000000..e5427264 Binary files /dev/null and b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/Result.pptx differ diff --git a/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Program.cs b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Program.cs new file mode 100644 index 00000000..52d486b6 --- /dev/null +++ b/Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Program.cs @@ -0,0 +1,32 @@ +using Syncfusion.OfficeChart; +using Syncfusion.Presentation; + +//Create an instance of presentation. +using IPresentation presentation = Presentation.Create(); +//Add a blank slide to the presentation. +ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank); +//Add a chart to the slide with position and size. +IPresentationChart chart = slide.Charts.AddChart(100, 10, 700, 500); +//Select the chart type. +chart.ChartType = OfficeChartType.Pie; +//Assign data range. +chart.DataRange = chart.ChartData[1, 1, 6, 2]; +chart.IsSeriesInRows = false; +//Set the values for the chart data. +chart.ChartData.SetValue(1, 1, "Food"); +chart.ChartData.SetValue(2, 1, "Fruits"); +chart.ChartData.SetValue(3, 1, "Vegetables"); +chart.ChartData.SetValue(4, 1, "Dairy"); +chart.ChartData.SetValue(5, 1, "Protein"); +chart.ChartData.SetValue(6, 1, "Grains"); +chart.ChartData.SetValue(1, 2, "Percentage"); +chart.ChartData.SetValue(2, 2, 36); +chart.ChartData.SetValue(3, 2, 14); +chart.ChartData.SetValue(4, 2, 13); +chart.ChartData.SetValue(5, 2, 28); +chart.ChartData.SetValue(6, 2, 9); +//Set data labels. +chart.Series[0].DataPoints.DefaultDataPoint.DataLabels.IsValue = true; +//Save the presentation. +using FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +presentation.Save(outputStream); diff --git a/Find-and-Replace/Find-and-Replace-in-PowerPoint/.NET/Find-and-Replace-in-PowerPoint/Output/Output.pptx b/Find-and-Replace/Find-and-Replace-in-PowerPoint/.NET/Find-and-Replace-in-PowerPoint/Output/Output.pptx new file mode 100644 index 00000000..17c15bfd Binary files /dev/null and b/Find-and-Replace/Find-and-Replace-in-PowerPoint/.NET/Find-and-Replace-in-PowerPoint/Output/Output.pptx differ diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output0.jpg b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output0.jpg new file mode 100644 index 00000000..a18a876b Binary files /dev/null and b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output0.jpg differ diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output1.jpg b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output1.jpg new file mode 100644 index 00000000..fc05a5fa Binary files /dev/null and b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output1.jpg differ diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output2.jpg b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output2.jpg new file mode 100644 index 00000000..5bf8eba8 Binary files /dev/null and b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output2.jpg differ diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Program.cs b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Program.cs index d339f8da..db231886 100644 --- a/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Program.cs +++ b/PPTX-to-Image-conversion/Convert-PowerPoint-presentation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Program.cs @@ -14,18 +14,20 @@ static void Main(string[] args) //Open the existing PowerPoint presentation. using (IPresentation pptxDoc = Presentation.Open(fileStream)) { - //Initialize the PresentationRenderer to perform image conversion. + //Initialize PresentationRenderer. pptxDoc.PresentationRenderer = new PresentationRenderer(); //Convert PowerPoint to image as stream. Stream[] images = pptxDoc.RenderAsImages(ExportImageFormat.Jpeg); - //Saves the images to file system - foreach (Stream stream in images) + //Save the images to file. + for (int i = 0; i < images.Length; i++) { - //Create the output image file stream - using (FileStream fileStreamOutput = File.Create(Path.GetFullPath("Output/Output" + Guid.NewGuid().ToString() + ".jpg"))) + using (Stream stream = images[i]) { - //Copy the converted image stream into created output stream - stream.CopyTo(fileStreamOutput); + //Save the image stream to a file. + using (FileStream fileStreamOutput = File.Create(Path.GetFullPath("Output/Output" + i + ".jpg"))) + { + stream.CopyTo(fileStreamOutput); + } } } } diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Output/Output.jpg b/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Output/Output.jpg new file mode 100644 index 00000000..5bf8eba8 Binary files /dev/null and b/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Output/Output.jpg differ diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Program.cs b/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Program.cs index 43d930d3..dd59a6a6 100644 --- a/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Program.cs +++ b/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Program.cs @@ -1,15 +1,22 @@ using Syncfusion.Presentation; using Syncfusion.PresentationRenderer; -//Load or open an PowerPoint Presentation. -using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -//Open an existing PowerPoint presentation. -using IPresentation pptxDoc = Presentation.Open(inputStream); -//Initialize the PresentationRenderer to perform image conversion. -pptxDoc.PresentationRenderer = new PresentationRenderer(); -//Convert PowerPoint slide to image as stream. -using Stream stream = pptxDoc.Slides[0].ConvertToImage(ExportImageFormat.Jpeg); -//Create the output image file stream. -using FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output.jpg")); -//Copy the converted image stream into created output stream. -stream.CopyTo(fileStreamOutput); \ No newline at end of file +//Open an existing presentation. +using (FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) +{ + //Load the presentation. + using (IPresentation pptxDoc = Presentation.Open(inputStream)) + { + //Initialize PresentationRenderer. + pptxDoc.PresentationRenderer = new PresentationRenderer(); + //Convert the PowerPoint slide as an image stream. + using (Stream stream = pptxDoc.Slides[0].ConvertToImage(ExportImageFormat.Jpeg)) + { + //Save the image stream to a file. + using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output.jpg"))) + { + stream.CopyTo(fileStreamOutput); + } + } + } +} \ No newline at end of file diff --git a/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/README.md b/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/README.md index 944afde6..3b402c85 100644 --- a/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/README.md +++ b/PPTX-to-Image-conversion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/README.md @@ -20,17 +20,25 @@ Step 4: Add the following code snippet in Program.cs file to convert a PowerPoin ```csharp //Load or open an PowerPoint Presentation. -using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -//Open an existing PowerPoint presentation. -using IPresentation pptxDoc = Presentation.Open(inputStream); -//Initialize the PresentationRenderer to perform image conversion. -pptxDoc.PresentationRenderer = new PresentationRenderer(); -//Convert PowerPoint slide to image as stream. -using Stream stream = pptxDoc.Slides[0].ConvertToImage(ExportImageFormat.Jpeg); -//Create the output image file stream. -using FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output.jpg")); -//Copy the converted image stream into created output stream. -stream.CopyTo(fileStreamOutput); +using (FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) +{ + //Open an existing PowerPoint presentation. + using (IPresentation pptxDoc = Presentation.Open(inputStream)) + { + //Initialize the PresentationRenderer to perform image conversion. + pptxDoc.PresentationRenderer = new PresentationRenderer(); + //Convert the PowerPoint slide as an image stream . + using (Stream stream = pptxDoc.Slides[0].ConvertToImage(ExportImageFormat.Jpeg)) + { + //Create the output image file stream. + using (FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/Output.jpg"))) + { + //Copy the converted image stream into created output stream. + stream.CopyTo(fileStreamOutput); + } + } + } +} ``` More information about PPTX to Image conversion can be found in this [documentation](https://help.syncfusion.com/document-processing/powerpoint/conversions/powerpoint-to-image/net/presentation-to-image) section. \ No newline at end of file diff --git a/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Output/PPTXToPDF.pdf b/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Output/PPTXToPDF.pdf new file mode 100644 index 00000000..f95a3838 Binary files /dev/null and b/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Output/PPTXToPDF.pdf differ diff --git a/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Program.cs b/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Program.cs index 54427118..e7c73779 100644 --- a/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Program.cs +++ b/PPTX-to-PDF-conversion/Convert-PowerPoint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Program.cs @@ -2,18 +2,20 @@ using Syncfusion.Presentation; using Syncfusion.PresentationRenderer; -//Load or open an PowerPoint Presentation. -using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); -//Open an existing PowerPoint presentation. -using IPresentation pptxDoc = Presentation.Open(inputStream); -//Create the MemoryStream to save the converted PDF. -using MemoryStream pdfStream = new(); -//Convert the PowerPoint document to PDF document. -using PdfDocument pdfDocument = PresentationToPdfConverter.Convert(pptxDoc); -//Save the converted PDF document to MemoryStream. -pdfDocument.Save(pdfStream); -pdfStream.Position = 0; -//Create the output PDF file stream. -using FileStream fileStreamOutput = File.Create(Path.GetFullPath(@"Output/PPTXToPDF.pdf")); -//Copy the converted PDF stream into created output PDF stream. -pdfStream.CopyTo(fileStreamOutput); \ No newline at end of file +//Open the PowerPoint file stream. +using (FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) +{ + //Load an existing PowerPoint Presentation. + using (IPresentation pptxDoc = Presentation.Open(fileStream)) + { + //Convert PowerPoint into PDF document. + using (PdfDocument pdfDocument = PresentationToPdfConverter.Convert(pptxDoc)) + { + //Save the PDF file to file system. + using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/PPTXToPDF.pdf"), FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite)) + { + pdfDocument.Save(outputStream); + } + } + } +} \ No newline at end of file diff --git a/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting.sln b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting.sln new file mode 100644 index 00000000..357121de --- /dev/null +++ b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35327.3 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simple-text-and-paragraph-formatting", "Simple-text-and-paragraph-formatting\Simple-text-and-paragraph-formatting.csproj", "{AAA91223-CD0E-4333-BC4C-F98D29CC228A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {AAA91223-CD0E-4333-BC4C-F98D29CC228A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAA91223-CD0E-4333-BC4C-F98D29CC228A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAA91223-CD0E-4333-BC4C-F98D29CC228A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAA91223-CD0E-4333-BC4C-F98D29CC228A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {879355F6-5C8B-4DE1-9A87-B35CF94F090B} + EndGlobalSection +EndGlobal diff --git a/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Data/Template.pptx b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Data/Template.pptx new file mode 100644 index 00000000..5746d9bf Binary files /dev/null and b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Data/Template.pptx differ diff --git a/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/.gitkeep b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/.gitkeep new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/.gitkeep @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/Result.pptx b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/Result.pptx new file mode 100644 index 00000000..882029de Binary files /dev/null and b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/Result.pptx differ diff --git a/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Program.cs b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Program.cs new file mode 100644 index 00000000..59d8388d --- /dev/null +++ b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Program.cs @@ -0,0 +1,21 @@ +using Syncfusion.Presentation; + +//Load PowerPoint Presentation. +using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); +//Open an existing PowerPoint presentation. +using IPresentation pptxDoc = Presentation.Open(inputStream); +//Retrieve the first slide from Presentation +ISlide slide = pptxDoc.Slides[0]; +//Retrieve the first shape. +IShape shape = slide.Shapes[0] as IShape; +//Retrieve the first paragraph of the shape. +IParagraph paragraph = shape.TextBody.Paragraphs[0]; +//Set center alignment for the paragraph. +paragraph.HorizontalAlignment = HorizontalAlignmentType.Center; +//Retrieve the first TextPart of the shape. +ITextPart textPart = paragraph.TextParts[0]; +//Set bold for the text. +textPart.Font.Bold = true; +//Save the PowerPoint Presentation. +using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +pptxDoc.Save(outputStream); diff --git a/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Simple-text-and-paragraph-formatting.csproj b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Simple-text-and-paragraph-formatting.csproj new file mode 100644 index 00000000..81035b37 --- /dev/null +++ b/Paragraphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Simple-text-and-paragraph-formatting.csproj @@ -0,0 +1,23 @@ + + + + Exe + net8.0 + Simple_text_and_paragraph_formatting + enable + enable + + + + + + + + + Always + + + Always + + + diff --git a/PowerPoint-Presentation/Merge-two-presentations/.NET/Merge-two-presentations/Output/Result.pptx b/PowerPoint-Presentation/Merge-two-presentations/.NET/Merge-two-presentations/Output/Result.pptx new file mode 100644 index 00000000..3c599c5e Binary files /dev/null and b/PowerPoint-Presentation/Merge-two-presentations/.NET/Merge-two-presentations/Output/Result.pptx differ diff --git a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Data/Template.pptx b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Data/Template.pptx new file mode 100644 index 00000000..5746d9bf Binary files /dev/null and b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Data/Template.pptx differ diff --git a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Encrypt-PowerPoint-with-password.csproj b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Encrypt-PowerPoint-with-password.csproj index 4ae117d6..cecdbca6 100644 --- a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Encrypt-PowerPoint-with-password.csproj +++ b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Encrypt-PowerPoint-with-password.csproj @@ -13,6 +13,9 @@ + + Always + Always diff --git a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Output/Result.pptx b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Output/Result.pptx new file mode 100644 index 00000000..a8a1f8a9 Binary files /dev/null and b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Output/Result.pptx differ diff --git a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Program.cs b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Program.cs index dcb647ab..8c66fb83 100644 --- a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Program.cs +++ b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Program.cs @@ -1,14 +1,9 @@ using Syncfusion.Presentation; -//Load or open an PowerPoint Presentation. -using IPresentation presentation = Presentation.Create(); -//Add slide to Presentation. -ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank); -//Add textbox to slide. -IShape shape = slide.Shapes.AddTextBox(100, 30, 200, 300); -//Add a paragraph with text content. -IParagraph paragraph = shape.TextBody.AddParagraph("Password Protected."); -//Protects the file with password. -presentation.Encrypt("PASSWORD!@1#$"); -using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +//Open an existing presentation. +using FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read); +using IPresentation presentation = Presentation.Open(inputStream); +//Encrypt the presentation with a password. +presentation.Encrypt("syncfusion"); +using FileStream outputStream = new (Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); presentation.Save(outputStream); \ No newline at end of file diff --git a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/README.md b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/README.md index d7e50aef..2adbea16 100644 --- a/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/README.md +++ b/Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/README.md @@ -12,23 +12,17 @@ Step 3: Include the following namespaces in the Program.cs file. ```csharp using Syncfusion.Presentation; -using System.IO; ``` Step 4: Add the following code snippet in Program.cs file to encrypt the PowerPoint Presentation. ```csharp -//Load or open an PowerPoint Presentation. -using IPresentation presentation = Presentation.Create(); -//Add slide to Presentation. -ISlide slide = presentation.Slides.Add(SlideLayoutType.Blank); -//Add textbox to slide. -IShape shape = slide.Shapes.AddTextBox(100, 30, 200, 300); -//Add a paragraph with text content. -IParagraph paragraph = shape.TextBody.AddParagraph("Password Protected."); -//Protects the file with password. -presentation.Encrypt("PASSWORD!@1#$"); -using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); +//Open an existing presentation. +using FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read); +using IPresentation presentation = Presentation.Open(inputStream); +//Encrypt the presentation with a password. +presentation.Encrypt("syncfusion"); +using FileStream outputStream = new (Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); presentation.Save(outputStream); ``` diff --git a/Security/Remove-encryption/.NET/Remove-encryption/Data/Template.pptx b/Security/Remove-encryption/.NET/Remove-encryption/Data/Template.pptx index a4533100..a8a1f8a9 100644 Binary files a/Security/Remove-encryption/.NET/Remove-encryption/Data/Template.pptx and b/Security/Remove-encryption/.NET/Remove-encryption/Data/Template.pptx differ diff --git a/Security/Remove-encryption/.NET/Remove-encryption/Output/Result.pptx b/Security/Remove-encryption/.NET/Remove-encryption/Output/Result.pptx new file mode 100644 index 00000000..774a7950 Binary files /dev/null and b/Security/Remove-encryption/.NET/Remove-encryption/Output/Result.pptx differ diff --git a/Security/Remove-encryption/.NET/Remove-encryption/Program.cs b/Security/Remove-encryption/.NET/Remove-encryption/Program.cs index 7a9beabd..bed451ab 100644 --- a/Security/Remove-encryption/.NET/Remove-encryption/Program.cs +++ b/Security/Remove-encryption/.NET/Remove-encryption/Program.cs @@ -3,7 +3,7 @@ //Load or open an PowerPoint Presentation. using FileStream inputStream = new(Path.GetFullPath(@"Data/Template.pptx"), FileMode.Open, FileAccess.Read, FileShare.ReadWrite); //Open an existing Presentation from file system and it can be decrypted by using the provided password. -using IPresentation presentation = Presentation.Open(inputStream, "PASSWORD!@1#$"); +using IPresentation presentation = Presentation.Open(inputStream, "syncfusion"); //Decrypt the document. presentation.RemoveEncryption(); using FileStream outputStream = new(Path.GetFullPath(@"Output/Result.pptx"), FileMode.Create, FileAccess.ReadWrite); diff --git a/Security/Remove-encryption/.NET/Remove-encryption/README.md b/Security/Remove-encryption/.NET/Remove-encryption/README.md index 6aeef069..0346d238 100644 --- a/Security/Remove-encryption/.NET/Remove-encryption/README.md +++ b/Security/Remove-encryption/.NET/Remove-encryption/README.md @@ -12,7 +12,6 @@ Step 3: Include the following namespaces in the Program.cs file. ```csharp using Syncfusion.Presentation; -using System.IO; ``` Step 4: Add the following code snippet in Program.cs file to decrypt the PowerPoint Presentation. diff --git a/Shapes/Add-PowerPoint-shape/.NET/Add-PowerPoint-shape/Output/Result.pptx b/Shapes/Add-PowerPoint-shape/.NET/Add-PowerPoint-shape/Output/Result.pptx new file mode 100644 index 00000000..94581d95 Binary files /dev/null and b/Shapes/Add-PowerPoint-shape/.NET/Add-PowerPoint-shape/Output/Result.pptx differ diff --git a/Slide-transitions/Apply-PowerPoint-slide-transition/.NET/Apply-PowerPoint-slide-transition/Output/Result.pptx b/Slide-transitions/Apply-PowerPoint-slide-transition/.NET/Apply-PowerPoint-slide-transition/Output/Result.pptx new file mode 100644 index 00000000..2a5317a5 Binary files /dev/null and b/Slide-transitions/Apply-PowerPoint-slide-transition/.NET/Apply-PowerPoint-slide-transition/Output/Result.pptx differ diff --git a/Slides/Add-PowerPoint-slide/.NET/Add-PowerPoint-slide/Output/Result.pptx b/Slides/Add-PowerPoint-slide/.NET/Add-PowerPoint-slide/Output/Result.pptx new file mode 100644 index 00000000..023a87ed Binary files /dev/null and b/Slides/Add-PowerPoint-slide/.NET/Add-PowerPoint-slide/Output/Result.pptx differ