Dear Aspose Team,
One of our tests caught an issue in the Aspose.Diagram’s Save method.
We use Aspose.Diagram to load Visio documents into Diagrams before we process them. The process that we make, is loading the Visio document into a Diagram, then saving it with the diagram’s Save method. Then after that, we load the saved Visio document, and save it again with the Save method.
The problem we found is the following. The file that we save in the first run, is the same as the source file. But, when we load then save the file from the first run, then it produces a different file: the file’s document properties has changed, more precisely the custom.xml file.
We found out that the difference is produced by the locale. In the second run the time is written out depending on the locale in which we are in. The issue is not present in the first run, only just when we try to process an already saved file again.
image.png (22.9 KB)
Here is a sample code that we were able to reproduce the issue.
string sourceFilePath = "C:\\...\\Downloads\\aspose\\1Space.vsdx";
string exportedFilePath = "C:\...\\Downloads\\aspose\\1Space_Exported.vsdx";
string doubleExportedFilePath = "C:\\...\\Downloads\\aspose\\1Space_Double Exported.vsdx";
var diagram = new Diagram(sourceFilePath);
diagram.Save(exportedFilePath, SaveFileFormat.Vsdx);
var exportedDiagram = new Diagram(exportedFilePath);
exportedDiagram.Save(doubleExportedFilePath, SaveFileFormat.Vsdx);
I am also attaching to you the source file, the exported file from the first run, and the double exported file from the second run.
1Space.zip (34.0 KB)
Also, we could reproduce the issue with the latest version of Aspose.Diagram as well.
Is there a setting that we miss or is this a real issue?
We are waiting for your findings/answers.
Kind regards,
Varga Matild