IImageSavingHandler
Leave feedback
On this page
Callback interface invoked for each image encountered during conversion when using CustomImagesStrategy. Implement this interface to rename images, redirect output to a custom stream, or apply other custom logic.
public interface IImageSavingHandler
| Name | Description |
|---|---|
| Handle(CustomImageSavingArgs) | Called once for each image found in the source document during conversion. |
Rename images with a sequential prefix:
public class RenameHandler : IImageSavingHandler
{
private int _index;
public void Handle(CustomImageSavingArgs args)
{
args.SetOutputImageFileName($"img_{_index}_{args.ImageFileName}");
_index++;
}
}
- namespace GroupDocs.Markdown
- assembly GroupDocs.Markdown
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.