Skip to content

Commit b4bd357

Browse files
Added sample
1 parent 600743f commit b4bd357

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-Markdown-to-Presentation", "Convert-Markdown-to-Presentation\Convert-Markdown-to-Presentation.csproj", "{2F4CF0E4-9DC6-1598-F362-BCAFBA250F7C}"
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+
{2F4CF0E4-9DC6-1598-F362-BCAFBA250F7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{2F4CF0E4-9DC6-1598-F362-BCAFBA250F7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{2F4CF0E4-9DC6-1598-F362-BCAFBA250F7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{2F4CF0E4-9DC6-1598-F362-BCAFBA250F7C}.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 = {B0691798-8135-4BFB-9A63-AB5C12E768A7}
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.md">
16+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
17+
</None>
18+
<None Update="Output\.gitkeep">
19+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
20+
</None>
21+
</ItemGroup>
22+
23+
</Project>

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

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_Markdown_to_Presentation
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.md"), FileMode.Open, FileAccess.Read))
12+
{
13+
//Load the file stream.
14+
using (IPresentation presentation = Presentation.Open(fileStream))
15+
{
16+
//Save as a Markdown document into the PPTX FileStream.
17+
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/MarkdownToPPTX.pptx"), FileMode.Create))
18+
{
19+
presentation.Save(outputStream);
20+
}
21+
}
22+
}
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)