Save image as file

This example demonstrates how to saves images to the file system during document conversion.

AdvancedUsage.Strategy.ImageFileStrategy

using (var converter = new MarkdownConverter("example.pdf"))
{
    var options = new DocumentConverterOptions
    {
        ImageExportStrategy = new ExportImagesToFileSystemStrategy("D:\\Images\\")
    };

    converter.Convert("output.md", options);
}

More resources

GitHub examples

You may easily run the code above and see the feature in action in our GitHub examples: