Created
December 16, 2025 10:10
-
-
Save conholdate-gists/12566d2dc03237c87f93b82f3fc36ae7 to your computer and use it in GitHub Desktop.
Convert PPTX to Markdown with Conholdate.Total for .NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using Conholdate.Total; // Namespace for the conversion library | |
| namespace PptxToMarkdownDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| // Path to the source PPTX file | |
| string sourcePath = "input.pptx"; | |
| // Path where the Markdown file will be saved | |
| string outputPath = "output.md"; | |
| try | |
| { | |
| // Initialize the presentation converter | |
| var converter = new PresentationConverter(); | |
| // Optional: configure export options (e.g., export images) | |
| converter.Options.MarkdownExportImages = true; | |
| // Perform the conversion | |
| bool success = converter.Convert(sourcePath, outputPath, ExportFormat.Markdown); | |
| if (success) | |
| { | |
| Console.WriteLine($"Conversion succeeded. Markdown saved to: {outputPath}"); | |
| } | |
| else | |
| { | |
| Console.WriteLine("Conversion failed. Check the logs for details."); | |
| } | |
| } | |
| catch (Exception ex) | |
| { | |
| Console.WriteLine($"Error during conversion: {ex.Message}"); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment