The SVG format is mostly used for embedding content in desktop and web applications. There might be situations where you need to embed your MPP files into desktop or web applications. To achieve that, converting your MPP files to SVG format will prove to be helpful. To that end, this article will teach you how to convert MPP files to SVG format using Java.
- Java API for Converting MPP Files to SVG Format
- Convert MPP Files to SVG Format using Java
- Convert MPP Files to SVG Format with Additional Options
Java API for Converting MPP Files to SVG Format
Aspose.Tasks for Java is an API for working with Microsoft Project (MPP) files. It allows you to read and write MPP/XML files without requiring Microsoft Project to be installed. You can also convert MPP files to SVG format using the API. You can either download the API using Maven or download the JAR from the downloads section.
Repository
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>http://repository.aspose.com/repo/</url>
</repository>
Dependency
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-tasks</artifactId>
<version>21.10</version>
<classifier>jdk18</classifier>
</dependency>
Convert MPP Files to SVG Format using Java
The following are the steps to convert Microsoft Project MPP files to SVG format.
- Load the MPP file using the Project class.
- Save the file as SVG using the Project.save(String filename, int format) method.
The following sample code shows how to convert MPP files to SVG format using Java.
Convert MPP Files to SVG Format with Additional Options
While converting MPP files to SVG format, you can use the additional options to customize the generated SVG. The following are the steps to convert MPP files to SVG format using additional options.
- Load the MPP file using the Project class.
- Create an instance of the SvgOptions class.
- Set the desired options.
- Save the SVG file using the Project.save(String filename, SaveOptions options) method.
The following sample code shows how to convert MPP files to SVG format with additional options using Java.
Get a Free License
In order to try the API without evaluation limitations, you can request a free temporary license.
Conclusion
In this article, you have learned how to convert MPP files to SVG format using Java. Furthermore, you have seen how to customize the generated SVG file using additional options. Aspose.Tasks for Java is a robust and feature-rich API that provides many additional features for working with MPP files. You can explore the API in detail by visiting the official documentation. In case of any questions, please feel free to reach us at our free support forum.