Created
December 16, 2025 10:46
-
-
Save conholdate-gists/0216ce8735613c7319f7a2fea15b7d11 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.Slides; // Namespace for presentation handling | |
| namespace PptxToMarkdownDemo | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| // Path to the source PPTX file | |
| string sourcePath = "sample.pptx"; | |
| // Path where the Markdown file will be saved | |
| string outputPath = "output.md"; | |
| try | |
| { | |
| // Load the PowerPoint presentation | |
| using (Presentation presentation = new Presentation(sourcePath)) | |
| { | |
| // Save the presentation 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