Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

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

Select an option

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