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

Free Support Forum - aspose.com

Strange behavior when calling updateFields(): Aspose converts shapes to images

Hi,


I am currently evaluating aspose Words. I have source document (.docx) which I load using aspose, then calling updateFields() and saving the word file back as docx format. I am observing that in some cases, the shapes within the source document get transformed into images. Please refer the attached source.docx and final.docx for reference. Note that in source I had some rectangular shape objects which can be expanded when needed. But observe that in the final.docx the same shapes are now an image. Not sure why doc.updateFields() is causing this problem. BTW, I am calling doc.updateFields() to refresh table of contents (not there is sample file). Also, the source document was generated using google docs. Not sure if it has to do something with that.

Here is the code run to generate this behavior.

Document doc = new Document(sourceFile);
//Need to update TOC if present
doc.updateFields();
File tempFile = createTempFile();
//Save back
doc.save(tempFile.getPath(), SaveFormat.DOCX);

Thanks,
Chinmay


Hi Chinmay,

Thanks for sharing the detail. I
have tested the scenario and have managed to reproduce the same issue
at my side. For the sake of correction, I have logged this problem in
our issue tracking system as WORDSNET-11659. I have linked this forum
thread to the same issue and you will be notified via this forum thread
once this issue is resolved.

We apologize for your inconvenience.

Thanks for the quick reply.

The issues you have found earlier (filed as WORDSNET-11659) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.