Skip to content

Commit bbe9aaf

Browse files
Added sample
1 parent b4bd357 commit bbe9aaf

5 files changed

Lines changed: 74 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.37301.10 d17.14
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Convert-Presentation-to-Markdown", "Convert-Presentation-to-Markdown\Convert-Presentation-to-Markdown.csproj", "{C280950F-91E6-9CA4-EA42-80D2A16BE880}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{C280950F-91E6-9CA4-EA42-80D2A16BE880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{C280950F-91E6-9CA4-EA42-80D2A16BE880}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{C280950F-91E6-9CA4-EA42-80D2A16BE880}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{C280950F-91E6-9CA4-EA42-80D2A16BE880}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {3DFDC2F4-0C28-49EA-869A-9C6A6BB898D1}
24+
EndGlobalSection
25+
EndGlobal
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
11+
<ItemGroup>
12+
<PackageReference Include="Syncfusion.Presentation.Net.Core" Version="*" />
13+
</ItemGroup>
14+
<ItemGroup>
15+
<None Update="Data\Input.pptx">
16+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
17+
</None>
18+
<None Update="Output\.gitkeep">
19+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
20+
</None>
21+
</ItemGroup>
22+
23+
</Project>

Presentation-to-Markdown-conversion/Convert-Presentation-to-Markdown/.NET/Convert-Presentation-to-Markdown/Data/Input.pptx

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Syncfusion.Presentation;
2+
3+
namespace Convert_Presentation_to_Markdown
4+
{
5+
class Program
6+
{
7+
8+
static void Main(string[] args)
9+
{
10+
//Open the file as a Stream.
11+
using (FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/Input.pptx"), FileMode.Open, FileAccess.Read))
12+
{
13+
//Load the file stream
14+
using (IPresentation presentation = Presentation.Open(fileStream))
15+
{
16+
//Save as a PPTX document into the Markdown FileStream.
17+
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/MarkdownToPPTX.md"), FileMode.Create))
18+
{
19+
presentation.Save(outputStream);
20+
}
21+
}
22+
}
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)