Skip Downloading of Unreachable Images during Word DOC to Text Conversion to Improve Timing | Implement IResource Loading Callback Java


We are currently using the 14.4 version of Aspose, but it is taking time for conversion for Chinese file. I tested with the latest version(20.4) but taking the time (35-40sec).
Will you please check this.

File shared by -



Have you also tried the latest 20.8 version of Aspose.Words for Java on your end? In case the problem still remains, then please ZIP and upload your input Word DOC document(s) you are getting this problem with here for testing. We will then investigate the issue on our end and provide you more information.

Yes, I tried the latest version 20.8, but facing the same timing issue.
I am attaching the ZIP. Please check it. (6.3 KB)


Problem occurs because there are images in Word DOC files that are referring to following paths:


Aspose.Words tries to download images from above paths but these sites are not available. If you disconnect from internet and then Aspose.Words processes these documents quickly. You can use the following Java code of Aspose.Words to workaround this problem:

LoadOptions opts = new LoadOptions();
opts.setResourceLoadingCallback(new HandleResourceLoadingCallback());
Document doc = new Document("C:\\Temp\\Chinese\\input.doc", opts);"C:\\Temp\\Chinese\\awjava-20.8.txt");

private static class HandleResourceLoadingCallback implements IResourceLoadingCallback {
    public int resourceLoading(ResourceLoadingArgs args) {
        if (args.getResourceType() == ResourceType.IMAGE) {
            return ResourceLoadingAction.SKIP;
        return ResourceLoadingAction.DEFAULT;

Please refer to IResourceLoadingCallback Interface for more information.