Use IImageSavingCallback error

when I user IImageSavingCallback,shows

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "D:\project\chatFIle\python\dps\dps\app\service\document_convert_service.py", line 426, in <module>
    class OriginalImageSaving(IImageSavingCallback):
TypeError: type 'aspose.words.saving.IImageSavingCallback' is not an acceptable base type

my code :class OriginalImageSaving(IImageSavingCallback):

    def image_saving(self, args: ImageSavingArgs) -> None:
        # if args.current_shape.is_image:
        #     originalImageFile = args.image_file_name
        #     shape = args.current_shape
        #     shape.image_data.save(f"{originalImageFile}")
        print()      
    document = aw.Document(source_file)
    saveOptions = aw.saving.MarkdownSaveOptions()
    a = saveOptions.image_saving_callback()
    saveOptions.image_saving_callback = OriginalImageSaving()
    document.save(f"{result}.md", saveOptions)

The error you are encountering, TypeError: type 'aspose.words.saving.IImageSavingCallback' is not an acceptable base type, suggests that there may be an issue with how you are implementing the IImageSavingCallback interface in your code.

To resolve this issue, ensure that your class correctly implements the IImageSavingCallback interface. Here’s a basic example of how to implement this interface in C#:

using Aspose.Words;
using Aspose.Words.Saving;

public class ImageShapePrinter : IImageSavingCallback
{
    private int mImageCount;

    public void ImageSaving(ImageSavingArgs args)
    {
        args.KeepImageStreamOpen = false;
        Console.WriteLine($"Image #{++mImageCount} is being saved.");
        // Additional logic for saving the image can be added here
    }
}

// Usage
Document doc = new Document("path/to/your/document.docx");
HtmlSaveOptions options = new HtmlSaveOptions();
options.ImageSavingCallback = new ImageShapePrinter();
doc.Save("output.html", options);

Make sure that your implementation of IImageSavingCallback is correctly defined and that you are using the appropriate namespaces. If you are using Python, ensure that the Aspose.Words library is correctly installed and that you are following the correct syntax for implementing interfaces in Python.

If you continue to face issues, please check the version of the Aspose.Words library you are using, as there may be compatibility issues with the interface implementation.

If you need further assistance, feel free to provide more details about your implementation or any additional error messages you are encountering.

@David_Matin Unfortunately, Aspose.Words for Python does not support using callbacks.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSPYTHON-3

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.