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

Free Support Forum - aspose.com

Inlining GroupShape drops Text content when converting word to HTML

I am trying to convert a word Document to Html using Aspose 15.4. The document contains a GroupShape object which is floating. I am iterating over the GroupShape objects in the document and setting its wrap type to Inline by calling setWrapType(WrapType.Inline) which succeeds. Then I am trying to save the document as HTML. While doing so, Aspose is converting the GroupShape to image. But the converted Image does not have any text that was present in the GroupShape. And the text content does not appear anywhere in the HTML as well.
Also, I also tried to convert the GroupShape directly to the image. The same was happening and the text was still dropped. Following is the code snippet:
<pre style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: 9pt;”>Document document = new Document(MyDir + “Test4.docx”);
GroupShape shape = (GroupShape)document.getChild(NodeType.GROUP_SHAPE, 0, true);
ShapeRenderer r = shape.getShapeRenderer();
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG);
r.save(MyDir + “Out.png”, options);Attached the document which is exhibiting the behavior.
Is there any way to safely Inline the GroupShape without losing the content? Please suggest.

Hi Prem,

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

Is there any way to get it working on 15.8. Any recommended work arounds will be great

Hi Prem,

Thanks for your inquiry. Please note that we do not provide support for older versions of Aspose.Words. We always encourage our customers to use the latest version of Aspose.Words as it contains newly introduced features, enhancements and fixes to the issues that were reported earlier.

Please use Aspose.Words for Java 17.3.0 and let us know if you have any more queries.