A vsd file imports successfuly and doesn’t have any issues when opened in Visio, but cached .wmf previews of equations that are on that diagram seem to be corrupt.
I tried to open .wmf files in the following applications: Microsoft Paint, Microsoft Visio, Microsoft Word, Gimp. All programs can’t import/display these .wmf files. Is there a way to fix this?
Path to .wmf files in converted .vsdx file: visio/media.
vsd file with described issue:
ms_equation_scheme.zip (48.0 KB)
The file was converted with this code snippet:
File file = new File(PATH_TO_VSD_FILE);
Diagram d = new Diagram(file.getAbsolutePath());
d.save(file.getAbsolutePath() + "x", SaveFileFormat.VSDX);
@casserolepan
It sounds like you’re experiencing issues with the .wmf files generated during the conversion from .vsd to .vsdx. Here’s a structured approach to troubleshoot and resolve the problem:
Cause: The issue may stem from the conversion process itself, the original .vsd file, or the specific version of Aspose.Diagram being used.
Solution: Follow these steps to identify and potentially resolve the issue:
-
Check for Updates: Ensure you are using the latest version of Aspose.Diagram. Updating to the latest version can resolve known bugs.
-
Inspect the Original VSD File: Open the original .vsd file in Visio to verify that the equations and their associated .wmf previews are functioning correctly. If they work fine, the issue likely lies in the conversion process.
-
Review the Conversion Code: While your code snippet for saving a .vsd file as .vsdx appears correct, consider adding error handling to catch any exceptions during the conversion. This can help pinpoint specific issues during the save operation.
-
Test with Different Files: Attempt to convert other .vsd files to determine if the issue is isolated to this specific file. This will help ascertain whether the problem is with the file itself or the conversion process.
-
Examine the Output Directory: After conversion, check the visio/media
directory for the .wmf files. If they are present but corrupted, this may indicate an issue with the generation of the .wmf files.
-
Use Alternative Tools: If the .wmf files remain unusable, consider using other tools or libraries to convert or manipulate the .wmf files to see if they can be repaired or opened.
Next Steps: If these steps do not resolve the issue, please provide any error messages or additional details about the behavior you are observing. This information will help us further investigate the problem.
I hope this helps! Please let me know if you have any further questions or need additional assistance.
@casserolepan
Thanks for the template file.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file.The wmf fail to open .
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): DIAGRAMNET-53788
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 DIAGRAMNET-53788) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou