IllegalStateException in convert vsdx to png for Aspose.Diagram for java

running in CentOS Linux release 7.2.1511 (Core) , IllegalStateException in convert vsdx to png for Aspose.Diagram for java . But the code is work ok in Windows 10.

java.lang.IllegalStateException: Cannot find resource {0}.
at com.aspose.diagram.a.c.q.a(Unknown Source)
at com.aspose.diagram.a.d.az.i(Unknown Source)
at com.aspose.diagram.a.d.az.g(Unknown Source)
at com.aspose.diagram.a.d.az.d(Unknown Source)
at com.aspose.diagram.a.d.bb.a(Unknown Source)
at com.aspose.diagram.a.d.bb.a(Unknown Source)
at com.aspose.diagram.a.d.bb.a(Unknown Source)
at com.aspose.diagram.mb.(Unknown Source)
at com.aspose.diagram.fn.a(Unknown Source)
at com.aspose.diagram.fn.a(Unknown Source)
at com.aspose.diagram.fn.a(Unknown Source)
at com.aspose.diagram.fn.a(Unknown Source)
at com.aspose.diagram.om.a(Unknown Source)
at com.aspose.diagram.om.a(Unknown Source)
at com.aspose.diagram.Diagram.a(Unknown Source)
at com.aspose.diagram.Diagram.save(Unknown Source)

JDK is 1.7.0_80 64bit both in linux or windows

@panhc1997,

Kindly send us your source VSDX drawing and code. We will investigate and share our findings with you. Your response is awaited.

Attached is source vsdx file. And the Code as blow:Base1.zip (49.6 KB)


Diagram diagram = new Diagram("/home/user/Base1.vsdx");
int pageIndex=0;

ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.setPageIndex(pageIndex);
diagram.save("/home/user/Base1.png", options);

thanks

@panhc1997,

We have tested your scenario with the latest version 17.10 of Aspose.Diagram for Java API and unable to replicate this error in our environment.

Environment details:
Red Hat Linux Server 6.6 Santiago
JDK 1.7
This is the output PNG: Base1.png (6.8 KB)

Kindly let us know which JDK and Aspose.Diagram for Java API versions are you using. Please also share all your environment details.

When I used JDK version 1.7.0_80 64bit , Aspose.Diagram 17.10 . OS CentOS Linux release 7.2.1511 (Core), The Exception occurred.
But I tested in CentOS Linux release 7.4.1708 (Core) , JDK version 1.7.0_80 64bit , Aspose.Diagram 17.10, it covert successfully.

And another problem , the Chinese text can’t be convert correctly. the problem also exist in your test result.

@panhc1997,

We have converted your source VSDX to PNG in CentOS 7.3.1611 and unable to replicate this error. You need to set the SimSun font as narrated in this help topic: Specify a font folder and Chinese text will be rendered. This is the output PNG: Base1CentOS.png (9.4 KB)

It appears as an environment specific error. We will investigate and let you know if it is reproducible at our end.

after installed fontConfig and SimSun font in OS, the convertion cames OK.
Thank a lot!

@panhc1997,

It is nice to hear from you that the problem has been resolved.