Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save conholdate-gists/5f910eb25c0288cd4e2408ff8bad9e12 to your computer and use it in GitHub Desktop.

Select an option

Save conholdate-gists/5f910eb25c0288cd4e2408ff8bad9e12 to your computer and use it in GitHub Desktop.
Convert PPTX to Markdown with Conholdate.Total for .NET
// 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