Visio diagram files are used to create different designs like organizational charts, UML diagrams, etc. Whereas, the VTX file format is a drawing template that is saved in XML format. In certain scenarios, you may need to convert a VSD or VSDX Visio file to the VTX format. Accordingly, this article explains how to convert a VSD or VSDX file to VTX format programmatically in Java.
- VSD or VSDX to VTX File Converter – Java API Installation
- Convert VSD Visio File to VTX in Java
- Convert VSDX to VTX File in Java
VSD and VSDX File to VTX File 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:
Repository:
<repositories>
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>http://repository.aspose.com/repo/</url>
</repository>
</repositories>
Dependency:
<dependencies>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-diagram</artifactId>
<version>22.5</version>
<classifier>jdk16</classifier>
</dependency>
</dependencies>
Convert VSD Visio File to VTX in Java
You can convert a VSD file to VTX file format with the following steps:
- Load the input Visio file with the Diagram class.
- Initialize a DiagramSaveOptions class instance.
- Convert VSD to VTX file format with the Save) method.
The code sample below demonstrates how to convert VSD Visio file to VTX file programmatically in Java:
Convert VSDX to VTX File in Java
You can easily convert a VSDX Visio file to the VTX format with the following steps:
- Create an object of the Diagram class to load the input VSDX file.
- Initialize DiagramSaveOptions class object to set output format.
- Convert the VSDX to VTX file format.
The code snippet below shows how to convert a VSDX Visio file to VTX format programmatically in Java:
Get a Free License
You may evaluate the API in its full capacity by requesting a free temporary license.
Conclusion
In this article, you have learned how to convert a VSD or VSDX Visio file to VTX format programmatically in Java. Furthermore, you may take a look at the documentation space to learn other features of the API. In case of any concerns, please write to us at the forum.