We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Image is lost after DOC to DOCX conversion using Java

When converting the original DOC to be a DOCX, the images are lost in the DOCX.

Using - aspose-words-20.5-jdk17.jar

This is the DOC2DOCX code:
com.aspose.words.Document doc = new com.aspose.words.Document(inputPath);
if (doc.hasMacros()) {
doc.removeMacros();
System.out.println(“Macros have been removed”);
}
doc.save(outputPath, com.aspose.words.SaveFormat.DOCX);

Here are the files, the original DOC and the converted DOCX:
MissingImages.zip (42.0 KB)

@simon.wiseman

Please note that Aspose.Words mimics the behavior of MS Word. The input document has empty shapes (images). If you save DOC to DOCX using MS Word, theses images are lost.

The DOC file does not have empty images (see attached “differences” document).
The images are lost after translating the DOC file to DOCX using Aspose.

image.png (141.6 KB)

@simon.wiseman

We have opened the document in MS Word 2016 and noticed that the image is empty. Please check the attached image. input.png (26.5 KB)

Please share which MS Word version you are using and make sure that you shared the correct document.

I was using “Microsoft Word for Office 365 MSO (16.0.11929.20836) 64-bit” to view the DOC file.

@simon.wiseman

Could you please use Office 365 to convert DOC to DOCX and share it here for our reference? We will investigate this issue further and provide you more information on it.

Attached is the converted DOCX file, that was created using Office 365.

7619.zip (24.7 KB)

@simon.wiseman

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-20684 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.