Aspose Visio import error

Hi,
I’m using your diagram java library to import visio vsdx file but I’m getting an error: Failure in attempt to import from the given .vdx-file. Error in element Page in \VisioDocument\Pages. newPage. Could you help me with it?

@Lukas_B

Thank you for contacting support.

Would you please share sample file with us by zipping and uploading it, along with narrowed down code snippet so that we may try to reproduce and investigate it in our environment. Before sharing requested data, please ensure using Aspose.Diagram for Java 18.11.

I tested it with the newest aspose diagram version and it still not working.
the code snippet:
private String convertInputStringToVdxString(InputStream inputStream, String name) throws Exception {
if(name.contains("." + VDX_EXTENSION)) {
return IOUtils.toString(inputStream, StandardCharsets.UTF_8.name());
} else {
com.aspose.diagram.Diagram diagram =
new com.aspose.diagram.Diagram(inputStream);

        DiagramSaveOptions options = new DiagramSaveOptions(SaveFileFormat.VDX);
        
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        diagram.save(bos, options);
        return bos.toString(StandardCharsets.UTF_8.name());
    }
}

In the attachement there is a problematic test file.

Infrastructure.zip (183.0 KB)

Thx for your help.

@Lukas_B

Thanks for sharing requested details.

We were able to replicate the issue that you have mentioned and logged it as DIAGRAMJAVA-50649 in our issue tracking system. We will further investigate it in details and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as DIAGRAMJAVA-50649) have been fixed in Aspose.Diagram for Java 19.2.