OutOfMemoryError converting visio

During converting visio this line code throw java.lang.OutOfMemoryError: Java heap space. How do you suggest to set java env to make it run if convert 1G source file?

Diagram dgrm = new Diagram(oriFilePath);

@guguzzz
Thanks for the template file.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMJAVA-51130

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as DIAGRAMJAVA-51130) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou