-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from SureshGanesanSF4645/master
Update GitHub for FT samples
- Loading branch information
Showing
35 changed files
with
227 additions
and
70 deletions.
There are no files selected for viewing
Binary file added
BIN
+25 KB
...ct-to-PowerPoint-shapes/.NET/Add-animation-effect-to-PowerPoint-shapes/Output/Output.pptx
Binary file not shown.
25 changes: 25 additions & 0 deletions
25
Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart.sln
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
19 changes: 19 additions & 0 deletions
19
Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Create-simple-pie-chart.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RootNamespace>Create_simple_pie_chart</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Presentation.NET" Version="*" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Update="Output\.gitkeep"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
</Project> |
1 change: 1 addition & 0 deletions
1
Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/.gitkeep
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Binary file added
BIN
+30.7 KB
Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Output/Result.pptx
Binary file not shown.
32 changes: 32 additions & 0 deletions
32
Charts/Create-simple-pie-chart/.NET/Create-simple-pie-chart/Program.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
Binary file added
BIN
+122 KB
...ace/Find-and-Replace-in-PowerPoint/.NET/Find-and-Replace-in-PowerPoint/Output/Output.pptx
Binary file not shown.
Binary file added
BIN
+214 KB
...ation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output0.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+212 KB
...ation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+197 KB
...ation-to-Image/.NET/Convert-PowerPoint-presentation-to-Image/Output/Output2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Binary file added
BIN
+197 KB
...erPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Output/Output.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 19 additions & 12 deletions
31
...rsion/Convert-PowerPoint-slide-to-Image/.NET/Convert-PowerPoint-slide-to-Image/Program.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
//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); | ||
} | ||
} | ||
} | ||
} |
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
Binary file added
BIN
+110 KB
...oint-presentation-to-PDF/.NET/Convert-PowerPoint-presentation-to-PDF/Output/PPTXToPDF.pdf
Binary file not shown.
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
25 changes: 25 additions & 0 deletions
25
...graphs/Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting.sln
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Binary file added
BIN
+122 KB
...ext-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Data/Template.pptx
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...e-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/.gitkeep
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Binary file added
BIN
+122 KB
...ext-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Output/Result.pptx
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
...Simple-text-and-paragraph-formatting/.NET/Simple-text-and-paragraph-formatting/Program.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
23 changes: 23 additions & 0 deletions
23
...ing/.NET/Simple-text-and-paragraph-formatting/Simple-text-and-paragraph-formatting.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<RootNamespace>Simple_text_and_paragraph_formatting</RootNamespace> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Syncfusion.Presentation.NET" Version="*" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Update="Data\Template.pptx"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
<None Update="Output\.gitkeep"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
</ItemGroup> | ||
</Project> |
Binary file added
BIN
+122 KB
...oint-Presentation/Merge-two-presentations/.NET/Merge-two-presentations/Output/Result.pptx
Binary file not shown.
Binary file added
BIN
+122 KB
...Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Data/Template.pptx
Binary file not shown.
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
Binary file added
BIN
+128 KB
...Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Output/Result.pptx
Binary file not shown.
17 changes: 6 additions & 11 deletions
17
Security/Encrypt-PowerPoint-with-password/.NET/Encrypt-PowerPoint-with-password/Program.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
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
Binary file modified
BIN
+1.5 KB
(100%)
Security/Remove-encryption/.NET/Remove-encryption/Data/Template.pptx
Binary file not shown.
Binary file not shown.
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
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
Binary file added
BIN
+45.3 KB
Shapes/Add-PowerPoint-shape/.NET/Add-PowerPoint-shape/Output/Result.pptx
Binary file not shown.
Binary file added
BIN
+24.3 KB
...ply-PowerPoint-slide-transition/.NET/Apply-PowerPoint-slide-transition/Output/Result.pptx
Binary file not shown.
Binary file added
BIN
+24.1 KB
Slides/Add-PowerPoint-slide/.NET/Add-PowerPoint-slide/Output/Result.pptx
Binary file not shown.