Created
December 16, 2025 11:41
-
-
Save conholdate-gists/5f910eb25c0288cd4e2408ff8bad9e12 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
| // Convert PPTX to Markdown - Complete Code Example | |
| using System; | |
| using Conholdate.Total.Slides; | |
| namespace PptxToMarkdownDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| // Input and output paths | |
| string inputPath = "sample.pptx"; | |
| string outputPath = "sample.md"; | |
| try | |
| { | |
| // Load the PPTX presentation | |
| using (Presentation presentation = new Presentation(inputPath)) | |
| { | |
| // Optional: set conversion options | |
| // presentation.SlideNotesExportMode = SlideNotesExportMode.ExportNotes; | |
| // Save as Markdown | |
| presentation.Save(outputPath, SaveFormat.Markdown); | |
| } | |
| Console.WriteLine($"Conversion successful. Markdown saved to {outputPath}"); | |
| } | |
| catch (Exception ex) | |
| { | |
| Console.Error.WriteLine($"Error during conversion: {ex.Message}"); | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment