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

Free Support Forum - aspose.com

Shape.Width returns incorrect value using Java

Hi, we are using aspose to read images in HTML, In the HTML (attached) image size is 730px but while using aspose it is returning as 530. Am i doing anything wrong?input.zip (1.7 MB)

Am using below code to achieve

Document doc = new Document(path + “input.html”);
Shape node = (Shape)doc.selectNodes("//Shape").get(0);
System.out.println(“Time:” +ConvertUtil.pointToPixel(node.getWidth()));


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-20318 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.


It is to inform you that we have closed this issue. Please use the latest version of Aspose.Words for Java 20.5 to get the correct output.

The issues you have found earlier (filed as WORDSNET-20318) have been fixed in this Aspose.Words for .NET 20.6 update and this Aspose.Words for Java 20.6 update.