Hey Evgen, thanks for the quick response, we really appreciate the support!
Just tried you alpha version, it now converts to a valid markdown. There is still a problem I have noticed. The converter detects stuff like tables and highlights as images. I will add a pdf example and the image it gave us and you can see that the colored table was given as an image in base64 in the markdown.
67355515-db80-4068-b462-6169a67936a3.pdf (112.3 KB)
image.jpg (46.3 KB)
Hello @dangilboa ,
We were able to reproduce this issue on our side. We have logged it in our tracking system under ID CONVERSIONNET-7935. After further investigation, we will get back to you with the results.
1 Like
@Shay_BH
Iām sorry for the delayed response. Now, with GroupDocs.Markdown for .NET 26.3 you can use custom image saving strategy and have full control over how images are saved, here is code snippet with example:
using System.IO;
using GroupDocs.Markdown;
public class ReplaceImageSavingHandler : IImageSavingHandler
{
public void Handle(CustomImageSavingArgs args)
{
// Replace the original image with a custom placeholder
Stream placeholder = File.OpenRead("placeholder.png");
args.SetReplacementImage(placeholder);
args.SetOutputImageFileName("placeholder.png");
}
}
var handler = new ReplaceImageSavingHandler();
var options = new ConvertOptions
{
ImageExportStrategy = new CustomImagesStrategy("output/images", handler)
};
MarkdownConverter.ToFile("business-plan.docx", "output/document.md", options);
You can find complete example in documentation: Replace image content with SetReplacementImage and in our code examples CustomStrategyReplace.cs.
Have a nice day!
Hey Vladimir
Thanks for the update!
What about supporting it in GroupDocs.Conversion?
Best,
Shay
@Shay_BH
Thanks for the feedback! Let me check if we can do that in Conversion the similar way as it is done in Markdown.
@Shay_BH
Thank you for your patience. We are working on adding support for a custom image-saving callback in GroupDocs.Conversion for .NET as well. This feature is scheduled for the upcoming GroupDocs.Conversion for .NET 26.6 release.
hey boris,
any eta on this one?
Shay_BH
The release is planned for the end of June.