Created
December 16, 2025 20:53
-
-
Save conholdate-gists/9d7ca2be9f5e582b154208f6d55c6c25 to your computer and use it in GitHub Desktop.
Convert PPTX to Markdown C# using 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 Conholdate.Total; | |
| using Conholdate.Total.Presentation; | |
| using System; | |
| using System.IO; | |
| namespace PptxToMarkdownDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| // Paths | |
| string inputPath = Path.Combine("Input", "Sample.pptx"); | |
| string outputFolder = "Output"; | |
| string outputMd = Path.Combine(outputFolder, "Sample.md"); | |
| string imageFolder = Path.Combine(outputFolder, "Images"); | |
| // Ensure output directories exist | |
| Directory.CreateDirectory(outputFolder); | |
| Directory.CreateDirectory(imageFolder); | |
| // Load presentation | |
| var presentation = new Presentation(); | |
| presentation.Load(inputPath); | |
| // Set export options | |
| var options = new PresentationExportOptions | |
| { | |
| ImageFolder = imageFolder, | |
| IncludeNotes = true // optional: include slide notes | |
| }; | |
| // Export to Markdown | |
| presentation.Export(outputMd, ExportFormat.Markdown, options); | |
| Console.WriteLine($"Conversion complete. Markdown saved to: {outputMd}"); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment