We have a particular vsdx file that we want to save its Diagram as a PNG image but the result is not OK with some shapes.
in attached files you will find the original file (TestImage.vsdx) that contains one page where two shapes are defined. when we try convert the diagram to a PNG file , the shapes become black.
here is the simple code that we used
License license = new License();
// The path to the documents directory.
String dataDir = “C://Users//ark//Desktop//Visio Import//”;
// Call the diagram constructor to load diagram from a VSD file
Diagram diagram = new Diagram(dataDir + “TestImage.vsdx”);
// set the image save option
ImageSaveOptions imgOpts = new ImageSaveOptions(SaveFileFormat.PNG);
//set page index to render a particular page
// Save as PNG TestImage.7z (130.9 KB)
diagram.save(dataDir + “testARKImage.png”, imgOpts);
System.out.println(“Process Completed Successfuly”);
Version Used : 126.96.36.199