Lose the image when converting the docx file to pdf

Hi,

Please see the following sample code, when Aspose convert the "figdoc.docx" , it lose the image in the file.

File converted = File.createTempFile("aspdf-", ".pdf");
Document doc = new Document("C:\\tmp\\figdoc.docx");
doc.getChildNodes(NodeType.COMMENT, true).clear();
File dotdoc = File.createTempFile("aspdf-", ".doc");
doc.save(dotdoc.getAbsolutePath(), SaveFormat.DOC);
doc = new Document(dotdoc.getAbsolutePath());
doc.save(converted.getAbsolutePath(), saveOptions);
Thanks for the help!

Ruhong

Hi Ruhong,

Thanks for your inquiry.

Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.11.1, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.11.1 and let us know how it goes on your side. I hope, this will help.

I have attached the output Pdf file with this post for your kind reference.

Hi Tahir,


The latest jar file make it work, thanks a lot!

Ruhong

Hi Ruhong,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.