Visio diagram files are used to create different designs with a number of shapes and icons. VSD or VSDX files are commonly used to create diagrams. However, sometimes you might need to convert a VSD or VSDX file to a VDX file which is based on XML schema. In accordance with such scenarios, this article explains how to convert a VSD or VSDX Diagram file to a VDX file in Java.
- Visio to VDX Converter – Java API Installation
- Convert VSD File to VDX in Java
- Convert VSDX to VDX File in Java
VSD and VSDX File to VDX Converter - Java API Installation
Aspose.Diagram for Java can be used to create, edit, or manipulate MS Visio diagrams from within Java-based applications. You can download its JAR file from the Downloads section or use the below configurations to install it from Aspose Repository in the pom.xml file of your project:
<repositories> <repository> <id>AsposeJavaAPI</id> <name>Aspose Java API</name> <url>http://repository.aspose.com/repo/</url> </repository> </repositories>
<dependencies> <dependency> <groupId>com.aspose</groupId> <artifactId>aspose-diagram</artifactId> <version>22.2</version> <classifier>jdk16</classifier> </dependency> </dependencies>
Convert VSD File to VDX in Java
You can convert a VSD file to VDX by following the steps below:
- Initialize a Diagram class instance to load the input VSD file.
- Convert the VSD file to VDX format using the Save method.
The following code snippet elaborates how to convert a VSD file to VDX format programmatically in Java:
Convert VSDX to VDX File in Java
You can convert a VSDX file to a VDX format file programmatically in Java:
- Instantiate a Diagram class instance to load the input VSDX Visio file.
- Convert the VSDX Visio file to VDX format.
The following code sample demonstrates how to convert a VSDX Visio file to a VDX file programmatically in Java:
Get a Free License
You can evaluate all the features of the API without any limitations by requesting a free temporary license.
In this article, you have learned how to convert a VSD or VSDX file programmatically in Java. Moreover, please feel free to visit the documentation to explore other features offered by the API. Feel free to get in touch with us at the forum.