Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Solution>
<Project Path="Embedding-Fonts/Embedding-Fonts.csproj" />
</Solution>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>Embedding_Fonts</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
</ItemGroup>

<ItemGroup>
<None Update="Data\Input.docx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Output\.gitkeep">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
using Syncfusion.DocIORenderer;
using System.IO;

namespace Embedding_Fonts
{
class Program
{
static void Main(string[] args)
{
using (WordDocument document = new WordDocument(Path.GetFullPath(@"Data/Input.docx")))
{
//Initialize the DocIORenderer.
using DocIORenderer renderer = new DocIORenderer();
//Enable the flag to embed complete TrueType/OpenType fonts used in the document.
document.SaveOptions.EmbedFonts = true;
//Save the Word document
document.Save(Path.GetFullPath(@"Output/Output.md"));
document.Close();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<Solution>
<Project Path="Convert-Word-to-Markdown-with-Word-Elements/Convert-Word-to-Markdown-with-Word-Elements.csproj" />
</Solution>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace>Convert_Word_to_Markdown_with_Word_Elements</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
</ItemGroup>
<ItemGroup>
<None Update="Data\Input.docx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Output\.gitkeep">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Syncfusion.DocIO;
using Syncfusion.DocIO.DLS;
using Syncfusion.DocIORenderer;
using System.IO;

namespace Convert_Word_to_Markdown_with_Word_Elements
{
class Program
{
static void Main(string[] args)
{
//Open an existing Word document.
using (WordDocument document = new WordDocument(Path.GetFullPath(@"Data/Input.docx")))
{
// Initialize the DocIORenderer to preserve Word elements as images.
using DocIORenderer docIORenderer = new DocIORenderer();
//Save the document as a Markdown file.
document.Save(Path.GetFullPath(@"Output/Output.md"));
}
}
}
}

Loading