java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0 when converting docx to html

Hi, we keep getting a “java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0” exception with some of our files when try to convert docx to html.


We are using Aspose.Words Java version <a href=“http://www.aspose.com/downloads/words/java/new-releases/aspose.words-for-java-16.4.0/” style=“font-family: “Helvetica Neue”, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 1.1; box-sizing: border-box; transition: all 0.3s ease; outline: 0px; text-decoration: none; color: rgb(51, 122, 183);”>16.4.0.

I have attached a very simple, sample Java program with a test file that causes this exception.

Would greatly appreciate your assistance with this issue.

Here is the stack trace:
Exception in thread “main” java.lang.RuntimeException: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at com.aspose.words.zzCA.zzJ(Unknown Source)
at com.aspose.words.zzCA.zzZ(Unknown Source)
at com.aspose.words.zzE8.zzZ(Unknown Source)
at com.aspose.words.zzE8.zzZ(Unknown Source)
at com.aspose.words.zzE8.zzY(Unknown Source)
at com.aspose.words.ShapeRenderer.(Unknown Source)
at com.aspose.words.zzX.zzZ(Unknown Source)
at com.aspose.words.zzX.zzY(Unknown Source)
at com.aspose.words.zzX.zzZ(Unknown Source)
at com.aspose.words.zzBA.zzH(Unknown Source)
at com.aspose.words.zzBA.visitShapeStart(Unknown Source)
at com.aspose.words.Shape.zzZ(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Shape.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Paragraph.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Body.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Section.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Document.accept(Unknown Source)
at com.aspose.words.zzBA.zzY(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
at com.inkling.export.Sample.main(Sample.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1016)
at java.awt.image.BufferedImage.(BufferedImage.java:333)
at asposewobfuscated.zzM9.(Unknown Source)
at asposewobfuscated.zzM9.(Unknown Source)
at asposewobfuscated.zzM9.(Unknown Source)
at com.aspose.words.zz6T.zzZ(Unknown Source)
at com.aspose.words.zz6R.zzVw(Unknown Source)
at asposewobfuscated.zzVS.zzZ(Unknown Source)
at com.aspose.words.zz6W.zzZ(Unknown Source)
at com.aspose.words.zz6P.visitCanvasEnd(Unknown Source)
at asposewobfuscated.zzF.zzZ(Unknown Source)
at com.aspose.words.zz6P.zzP(Unknown Source)
at com.aspose.words.zzE0.zzZ(Unknown Source)
at com.aspose.words.zzE0.zzZ(Unknown Source)
at com.aspose.words.zzE0.zzZ(Unknown Source)
at com.aspose.words.zzE0.zzZ(Unknown Source)
at com.aspose.words.zzFB.zzZ(Unknown Source)
at com.aspose.words.zzCA.zzJ(Unknown Source)
… 35 more

Hi Dinesh,

Thanks for your inquiry.

While using the latest version of Aspose.Words for Java i.e. 16.4.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSJAVA-1387. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

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


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

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


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