Convert chart in word to png issue

Hi Developer,

Good day.

I used old version aspose word for java to convert chart in word to png and got 2 issues.
So I tried the latest version aspose jar aspose-words-15.4.0-jdk16.jar. still 2 issues.

Issue 1: the first png generated from word is messed up.
Issue 2: the second chart in word cannot be generated to png(error occurs during generating png)

Already attached java code/input docx/output png(messed up) in a zip.
Also the error message for issue2 is in the zip.
Can you please take a look?

Regards,
Tong,Na

Hi Tong,

Thanks for your inquiry. I have tested the scenario using latest version of Aspose.Words for Java 15.4.0 and have not found the shared issue. Please use Aspose.Words for Java 15.4.0. I have attached the output chart images with this post for your kind reference.

I suggest you please read Aspose.Words Drawing API changes from here:
https://docs.aspose.com/words/java/aspose-words-for-java-15-2-0-release-notes/

Please use following code example to convert charts to images and let us know if you have any more queries.

Document doc = new Document(MyDir + "in.docx");
for (Shape shape : (Iterable)doc.getChildNodes(NodeType.SHAPE, true))
{
    if (shape.getName() != "")
        shape.getShapeRenderer().save(MyDir + shape.getName() + ".png", new ImageSaveOptions(SaveFormat.PNG));
}

Hi Tahir,

Thanks for your response!

Yes, the 2 issues above are resolved by using the latest version !

but new issues show up!

issue 1: texts on x-coordinate in the png generated from word are messed up (Please refer the chart 24 & chart 28 I attached)
Issue 2: texts displaying format on x-coordinate in the png generated is different from the format in the word (Please refer the char 26 & chart 30), we need the png generated which is the absolutely same with the chart in the word.

Looking forward to your reply !

Regards,
Tong Na

Hi Tong,

Thanks for sharing the detail. I have tested the scenario and have managed to reproduce the same issues at my side. For the sake of correction, I have logged these
problems in our issue tracking system as follow:

WORDSNET-11926 : ShapeRenderer.Save messed up the text on the x-coordinate of chart in output Png
WORDSNET-11927 : ShapeRenderer.Save does not save the x-coordinate of chart correctly in output Png

I have linked this forum thread to the same issues and you will be notified via this forum thread once these issues are resolved.

We apologize for your inconvenience.

Hi Tahir,

Thanks.
Can you suggest fix date?

Regards,
Na

Hi there,

Thanks for your inquiry. Hopefully, the fix of your issues will be available in June 2015 release. This release will be published at the end of June 2015. We will inform you via this forum thread once this release is published.

Thanks for your patience.

So just to confirm, the fix is being targeted for 15.5.0

Hi Apoorve,

Yes, fixes will be included in next 15.5.0 release of Aspose.Words.

Best regards,

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

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