VSDM Visio to PDF java

VSDM are the Visio diagram files that contain Macros. Such macros are usually develepod in Visual Basic for Applications which can perform different actions and are triggered on file opening. In certain cases, you might need to convert a VSDM Visio file to a PDF document. To achieve such requirements, this article covers how to convert a VSDM Diagram file to a PDF document in Java.

Visio to PDF Converter - Java API Configuration

Aspose.Diagram for Java is a class library designed to create, edit, or manipulate Visio diagrams from within Java applications. You do not need to instal MS Visio to work with this feature. Simply download the JAR file from the Downloads page, or use the following Maven configurations to access the API from Aspose repository:


        <name>Aspose Java API</name>



Convert VSDM Visio Diagram to PDF in Java

You can convert a VSDM file to a PDF document by following the steps below:

  1. Load the source Visio VSDM file using a Diagram class object.
  2. Export the VSDM file to PDF format using the Save method.

The sample code below demonstrates how to convert a VSDM file to a PDF document in Java:

Convert VSDM Diagram to PDF with Advanced Options in Java

VSDM to PDF conversion can be enhanced by setting up several properties exposed by the PdfSaveOptions class. For instance, page size, PDF security, and several other features for creating the PDF document as per your requirements. The steps below elaborate how to convert a VSDM to PDF format programmatically in Java:

  1. Initialize a Diagram class instance to load input VSDM diagram.
  2. Create an object of PdfSaveOptions class object.
  3. Set page size for the output PDF document.
  4. Convert the VSDM Visio file to PDF format.

The following code snippet elaborate how to convert a VSDM Visio file to a PDF document with advanced settings programmatically in Java:

Get a Free License

You can obtain a Free Temporary License in order to evaluate the API without any evaluation limitations.


In this article, you have learned how to export a VSDM Visio file to a PDF document programmatically in Java. Moreover, you may visit the documentation section to check several features covered under different chapters. Please feel free reach out to us at the forum in case you have any concerns.

See Also