PSD
JPG
PDF
XML
AI
PSD
Convert AI to PSD via Java
Native Java Library to Read, Write & Export AI to PSD without needing Adobe.
How to Convert AI to PSD Using Java
In order to render AI to PSD, we’ll use Aspose.PSD for Java API which is a feature-rich, powerful and easy to use conversion API for Java platform. You can download its latest version directly from Maven and install it within your Maven-based project by adding the following configurations to the pom.xml.
Repository
<repository>
<id>AsposeJavaAPI</id>
<name>Aspose Java API</name>
<url>https://repository.aspose.com/repo/</url>
</repository>
Dependency
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-psd</artifactId>
<version>version of aspose-psd API</version>
<classifier>jdk17</classifier>
</dependency>
Steps to Convert AI to PSD via Java
Aspose.PSD API makes it easy for the developers to convert AI file to PSD in just a few lines of code.
- Load input AI image
- Initialize PsdOptions class object
- Specify properties
- Save output PSD File
System Requirements
Aspose.PSD for Java supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.
- Microsoft Windows or a compatible OS with Java Runtime Environment for JSP/JSF Application and Desktop Applications.
- Get latest version of Aspose.PSD for Java directly from Aspose Maven Repository .
Convert AI to PSD - Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Convert from an AI file of version 8 to the PSD format. It just loads an existing AI file then saves it to PSD file formats. | |
String inAiFilePath = "form_8.ai"; | |
String outPsdFilePath = "form_8_export.psd"; | |
// Load an AI file of 8 version | |
AiImage aiImage = (AiImage)Image.load(inAiFilePath); | |
try{ | |
// Export the loaded AI file to the PSD file format with default options | |
aiImage.save(outPsdFilePath, new PsdOptions()); | |
}finally{ | |
aiImage.dispose(); | |
} |