From 32a655f584d048ce8757ccbf54f647e8f83a4063 Mon Sep 17 00:00:00 2001 From: ATCHAYASEKAR Date: Fri, 28 Aug 2026 13:40:01 +0530 Subject: [PATCH 1/3] Update UG Documentation, AI agent tool and skills to preserve graphic element as Fallback Images in Word-to-MD --- Document-Processing-toc.html | 3 + ...rd-to-markdown-preserve-fallback-images.md | 100 ++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 37c293bfdf..6bc77b926b 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -8439,6 +8439,9 @@
  • Word to Markdown
  • +
  • + Word to Markdown (Preserve Fallback Images) +
  • Markdown to Word
  • diff --git a/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md b/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md new file mode 100644 index 0000000000..14f6141a4d --- /dev/null +++ b/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md @@ -0,0 +1,100 @@ +--- +title: Preserve Charts, Shapes as Images in Word to Markdown | Syncfusion +description: Learn how to preserve Word elements as fallback images in Word-to-Markdown conversion using DocIO. +platform: document-processing +control: DocIO +documentation: UG +--- + +# Preserve Charts, Shapes as Fallback Images in Word to Markdown + +The .NET Word (DocIO) library preserves Word elements as fallback images when converting a Word document to a Markdown file. This ensures that content which does not have a direct Markdown equivalent is still retained in the output as an image. + +The following elements are preserved as fallback images during Word-to-Markdown conversion: + +* Chart +* Text Box +* Shape +* Ink +* MathML +* SmartArt + +N> On Windows, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically as images without any additional code. To preserve charts on Windows, use the `ChartToImageConverter`. On cross-platform (ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI), use the `DocIORenderer` to preserve all the Word elements (Chart, Text Box, Shape, Ink, MathML, and SmartArt) as images. + +## Preserve Charts, Shapes as Fallback Images + +By default, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically as fallback images during Word-to-Markdown conversion. For charts (and to preserve all elements on cross-platform), additional initialization is required based on the target platform. + +The following tabs explain how to preserve charts and other Word elements as fallback images on each platform. + + +### Cross-platform + +On cross-platform, install the **Syncfusion.DocIORenderer** NuGet package and initialize the `DocIORenderer` to preserve all Word elements (Chart, Text Box, Shape, Ink, MathML, and SmartArt) as fallback images. The `DocIORenderer` itself preserves charts as well, so no additional `ChartToImageConverter` initialization is required. + +#### NuGet package required + +* [Syncfusion.DocIORenderer](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core) + +#### Initialize DocIORenderer + +```csharp +DocIORenderer renderer = new DocIORenderer(); +``` + +### Windows-specific + +On Windows, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically without any additional code. For charts, install the **Syncfusion.OfficeChartToImageConverter** NuGet package and initialize the `ChartToImageConverter`. + +#### NuGet package required + +* [Syncfusion.OfficeChartToImageConverter](https://www.nuget.org/packages/Syncfusion.OfficeChartToImageConverter.WPF) + +#### Initialize ChartToImageConverter + +```csharp +wordDocument.ChartToImageConverter = new ChartToImageConverter(); +``` + +## Example + +The following code example shows how to preserve charts and other Word elements as fallback images while converting a Word document to a Markdown file. + +{% tabs %} + +{% highlight c# tabtitle="C# [Cross-platform]" %} +// Open an existing Word document. +using (WordDocument wordDocument = new WordDocument(Path.GetFullPath(@"Data/Input.docx"))) +{ + // Initialize the DocIORenderer to preserve Word elements (including charts) as images. + DocIORenderer renderer = new DocIORenderer(); + + // Save the document as a Markdown file. + wordDocument.Save(Path.GetFullPath(@"Output/Output.md")); +} +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} +// Open an existing Word document. +using (WordDocument wordDocument = new WordDocument("Input.docx", FormatType.Docx)) +{ + // Initialize the chart-to-image converter to preserve charts as images. + wordDocument.ChartToImageConverter = new ChartToImageConverter(); + + // Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically on Windows. + + // Save the document as a Markdown file. + wordDocument.Save("WordtoMd.md", FormatType.Markdown); +} +{% endhighlight %} + +{% endtabs %} + +You can download a complete working sample from GitHub. + +## See also + +* [Convert Word to Markdown](./word-to-markdown-conversion) +* [Convert Markdown to Word](./markdown-to-word-conversion) + + From 2adf00bd4d6f4ea4c005518846a1156c8b80a935 Mon Sep 17 00:00:00 2001 From: ATCHAYASEKAR Date: Fri, 28 Aug 2026 17:21:59 +0530 Subject: [PATCH 2/3] updated the description --- .../Conversions/word-to-markdown-preserve-fallback-images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md b/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md index 14f6141a4d..73ed6937c2 100644 --- a/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md +++ b/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md @@ -1,6 +1,6 @@ --- title: Preserve Charts, Shapes as Images in Word to Markdown | Syncfusion -description: Learn how to preserve Word elements as fallback images in Word-to-Markdown conversion using DocIO. +description: Learn how to preserve Word elements as fallback images during Word-to-Markdown conversion with DocIO. platform: document-processing control: DocIO documentation: UG From bfc0a8c8ef76c9f50335f20d724514e8ca8c20b3 Mon Sep 17 00:00:00 2001 From: ATCHAYASEKAR Date: Fri, 28 Aug 2026 19:42:08 +0530 Subject: [PATCH 3/3] updated the content in the existing conversion file --- Document-Processing-toc.html | 3 - .../word-to-markdown-conversion.md | 109 ++++++++++++++++++ ...rd-to-markdown-preserve-fallback-images.md | 100 ---------------- 3 files changed, 109 insertions(+), 103 deletions(-) delete mode 100644 Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index 6bc77b926b..37c293bfdf 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -8439,9 +8439,6 @@
  • Word to Markdown
  • -
  • - Word to Markdown (Preserve Fallback Images) -
  • Markdown to Word
  • diff --git a/Document-Processing/Word/Conversions/word-to-markdown-conversion.md b/Document-Processing/Word/Conversions/word-to-markdown-conversion.md index 733b2e0bce..d6da03edac 100644 --- a/Document-Processing/Word/Conversions/word-to-markdown-conversion.md +++ b/Document-Processing/Word/Conversions/word-to-markdown-conversion.md @@ -659,6 +659,115 @@ The following table shows the list of Word document elements supported in Word t +### Fallback images + +The .NET Word (DocIO) library preserves Word elements as fallback images when converting a Word document to a Markdown file. This ensures that content which does not have a direct Markdown equivalent is still retained in the output as an image. + +By default, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically as fallback images during Word-to-Markdown conversion. Charts require additional initialization depending on the target platform. + +N> On Windows, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically as images without any additional code. To preserve charts on Windows, use the `ChartToImageConverter`. On cross-platform (ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI), use the `DocIORenderer` to preserve all the Word elements (Chart, Text Box, Shape, Ink, MathML, and SmartArt) as images. + +The following Word elements are preserved as fallback images during Word-to-Markdown conversion. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Element in Word documentNotes
    Chart +Preserves charts as fallback images during Word-to-Markdown conversion. +
    Text BoxPreserves text boxes as fallback images during Word-to-Markdown conversion.
    ShapePreserves shapes as fallback images during Word-to-Markdown conversion.
    InkPreserves ink elements as fallback images during Word-to-Markdown conversion.
    MathMLPreserves MathML equations as fallback images during Word-to-Markdown conversion.
    SmartArtPreserves SmartArt graphics as fallback images during Word-to-Markdown conversion.
    + +**Cross-platform** + +On cross-platform platforms, install the [Syncfusion.DocIORenderer NuGet package](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core) and initialize `DocIORenderer`. It preserves all supported Word elements, including charts, as fallback images during Word-to-Markdown conversion. + +NuGet package required + +* [Syncfusion.DocIORenderer](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core) + +Initialize DocIORenderer + +```csharp +DocIORenderer renderer = new DocIORenderer(); +``` + +**Windows-specific** + +On Windows, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically without any additional code. For charts, install the **Syncfusion.OfficeChartToImageConverter** NuGet package and initialize the `ChartToImageConverter`. + +NuGet package required + +* [Syncfusion.OfficeChartToImageConverter](https://www.nuget.org/packages/Syncfusion.OfficeChartToImageConverter.WPF) + +Initialize ChartToImageConverter + +```csharp +wordDocument.ChartToImageConverter = new ChartToImageConverter(); +``` + +The following code example shows how to preserve charts and other Word elements as fallback images while converting a Word document to a Markdown file. + +{% tabs %} + +{% highlight c# tabtitle="C# [Cross-platform]" %} +// Open an existing Word document. +using (WordDocument wordDocument = new WordDocument(Path.GetFullPath(@"Data/Input.docx"))) +{ + // Initialize the DocIORenderer to preserve Word elements (including charts) as images. + using DocIORenderer renderer = new DocIORenderer(); + + // Save the document as a Markdown file. + wordDocument.Save(Path.GetFullPath(@"Output/Output.md")); +} +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} +// Open an existing Word document. +using (WordDocument wordDocument = new WordDocument("Input.docx", FormatType.Docx)) +{ + // Initialize the chart-to-image converter to preserve charts as images. + wordDocument.ChartToImageConverter = new ChartToImageConverter(); + + // Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically on Windows. + + // Save the document as a Markdown file. + wordDocument.Save("WordtoMd.md", FormatType.Markdown); +} +{% endhighlight %} + +{% endtabs %} + +You can download a complete working sample from GitHub. + ## Online Demo * Explore how to convert the Word document to Markdown using the [.NET Word Library](https://www.syncfusion.com/document-sdk/net-word-library) (DocIO) in a live demo [here](https://document.syncfusion.com/demos/word/wordtomarkdown#/tailwind). diff --git a/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md b/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md deleted file mode 100644 index 73ed6937c2..0000000000 --- a/Document-Processing/Word/Conversions/word-to-markdown-preserve-fallback-images.md +++ /dev/null @@ -1,100 +0,0 @@ ---- -title: Preserve Charts, Shapes as Images in Word to Markdown | Syncfusion -description: Learn how to preserve Word elements as fallback images during Word-to-Markdown conversion with DocIO. -platform: document-processing -control: DocIO -documentation: UG ---- - -# Preserve Charts, Shapes as Fallback Images in Word to Markdown - -The .NET Word (DocIO) library preserves Word elements as fallback images when converting a Word document to a Markdown file. This ensures that content which does not have a direct Markdown equivalent is still retained in the output as an image. - -The following elements are preserved as fallback images during Word-to-Markdown conversion: - -* Chart -* Text Box -* Shape -* Ink -* MathML -* SmartArt - -N> On Windows, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically as images without any additional code. To preserve charts on Windows, use the `ChartToImageConverter`. On cross-platform (ASP.NET Core, Blazor, Xamarin, UWP, .NET MAUI, and WinUI), use the `DocIORenderer` to preserve all the Word elements (Chart, Text Box, Shape, Ink, MathML, and SmartArt) as images. - -## Preserve Charts, Shapes as Fallback Images - -By default, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically as fallback images during Word-to-Markdown conversion. For charts (and to preserve all elements on cross-platform), additional initialization is required based on the target platform. - -The following tabs explain how to preserve charts and other Word elements as fallback images on each platform. - - -### Cross-platform - -On cross-platform, install the **Syncfusion.DocIORenderer** NuGet package and initialize the `DocIORenderer` to preserve all Word elements (Chart, Text Box, Shape, Ink, MathML, and SmartArt) as fallback images. The `DocIORenderer` itself preserves charts as well, so no additional `ChartToImageConverter` initialization is required. - -#### NuGet package required - -* [Syncfusion.DocIORenderer](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core) - -#### Initialize DocIORenderer - -```csharp -DocIORenderer renderer = new DocIORenderer(); -``` - -### Windows-specific - -On Windows, Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically without any additional code. For charts, install the **Syncfusion.OfficeChartToImageConverter** NuGet package and initialize the `ChartToImageConverter`. - -#### NuGet package required - -* [Syncfusion.OfficeChartToImageConverter](https://www.nuget.org/packages/Syncfusion.OfficeChartToImageConverter.WPF) - -#### Initialize ChartToImageConverter - -```csharp -wordDocument.ChartToImageConverter = new ChartToImageConverter(); -``` - -## Example - -The following code example shows how to preserve charts and other Word elements as fallback images while converting a Word document to a Markdown file. - -{% tabs %} - -{% highlight c# tabtitle="C# [Cross-platform]" %} -// Open an existing Word document. -using (WordDocument wordDocument = new WordDocument(Path.GetFullPath(@"Data/Input.docx"))) -{ - // Initialize the DocIORenderer to preserve Word elements (including charts) as images. - DocIORenderer renderer = new DocIORenderer(); - - // Save the document as a Markdown file. - wordDocument.Save(Path.GetFullPath(@"Output/Output.md")); -} -{% endhighlight %} - -{% highlight c# tabtitle="C# [Windows-specific]" %} -// Open an existing Word document. -using (WordDocument wordDocument = new WordDocument("Input.docx", FormatType.Docx)) -{ - // Initialize the chart-to-image converter to preserve charts as images. - wordDocument.ChartToImageConverter = new ChartToImageConverter(); - - // Text Box, Shape, Ink, MathML, and SmartArt are preserved automatically on Windows. - - // Save the document as a Markdown file. - wordDocument.Save("WordtoMd.md", FormatType.Markdown); -} -{% endhighlight %} - -{% endtabs %} - -You can download a complete working sample from GitHub. - -## See also - -* [Convert Word to Markdown](./word-to-markdown-conversion) -* [Convert Markdown to Word](./markdown-to-word-conversion) - -