diff --git a/Document-Processing/PowerPoint/Conversions/powerpoint-to-markdown.md b/Document-Processing/PowerPoint/Conversions/powerpoint-to-markdown.md index 2635dd6895..eb7015ffcc 100644 --- a/Document-Processing/PowerPoint/Conversions/powerpoint-to-markdown.md +++ b/Document-Processing/PowerPoint/Conversions/powerpoint-to-markdown.md @@ -115,7 +115,7 @@ async void Save(MemoryStream streams, string filename) You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PowerPoint-Examples/tree/master/PPTX-to-Markdown-Conversion/Convert-PPTX-to-Markdown). -### Preserving Charts, SmartArt, and Other Elements as Fallback Images +### Preserve Visual Elements as Images The .NET PowerPoint (Presentation) library preserves PowerPoint elements such as Chart, SmartArt, GroupShape, and OLE Object as fallback images when converting a PowerPoint presentation 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. @@ -151,6 +151,19 @@ using (IPresentation presentation = Presentation.Open("Input.pptx")) } {% endhighlight %} +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +'Open an existing PowerPoint Presentation. +Using presentation As IPresentation = Presentation.Open("Input.pptx") + 'Initialize the chart-to-image converter to preserve charts as images. + presentation.ChartToImageConverter = New ChartToImageConverter() + + 'SmartArt, GroupShape, and OLE Object are preserved automatically on Windows. + + 'Save the PowerPoint Presentation as a Markdown file. + presentation.Save("Output.md") +End Using +{% endhighlight %} + {% endtabs %} You can download a complete working sample from GitHub. diff --git a/Document-Processing/Word/Conversions/word-to-markdown-conversion.md b/Document-Processing/Word/Conversions/word-to-markdown-conversion.md index bcc30ec85e..caa3db3665 100644 --- a/Document-Processing/Word/Conversions/word-to-markdown-conversion.md +++ b/Document-Processing/Word/Conversions/word-to-markdown-conversion.md @@ -659,7 +659,7 @@ The following table shows the list of Word document elements supported in Word t -### Preserving Charts, Shapes, and Other Elements as Images +### Preserve Visual Elements as Images The .NET Word (DocIO) library preserves Word elements such as Chart, Text Box, Shape, Ink, MathML, SmartArt, Canvas, and GroupShape 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. @@ -695,6 +695,19 @@ using (WordDocument wordDocument = new WordDocument("Input.docx", FormatType.Doc } {% endhighlight %} +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +'Open an existing Word document. +Using wordDocument As 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) +End Using +{% endhighlight %} + {% endtabs %} You can download a complete working sample from GitHub. diff --git a/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md b/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md index 43dd5d950a..894ca44a2a 100644 --- a/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md +++ b/Document-Processing/Word/Word-Library/NET/Working-with-Word-document.md @@ -1031,6 +1031,7 @@ You can embed the fonts used in a Word document directly into the saved file by N> Embedding font is supported on both Windows and cross-platform (ASP.NET Core, Blazor, .NET MAUI, and WinUI) environments. N> For cross-platform applications, install the [Syncfusion.DocIORenderer.Net.Core](https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core) NuGet package. N> Initialize the `DocIORenderer` to embed fonts in the document. +N> It is supported only for DOCX format document N> Embedding font is not supported on the UWP platform. Use the following code to embed fonts before saving the document. @@ -1063,6 +1064,17 @@ using (WordDocument document = new WordDocument("Input.docx", FormatType.Docx)) } {% endhighlight %} +{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %} +'Load an existing Word document. +Using document As WordDocument = New WordDocument("Input.docx", FormatType.Docx) + 'Enable the flag to embed complete TrueType/OpenType fonts used in the document. + document.SaveOptions.EmbedFonts = True + 'Save the Word document. + document.Save("Output.docx", FormatType.Docx) + document.Close() +End Using +{% endhighlight %} + {% endtabs %} You can download a complete working sample from GitHub.