Add Text Watermark to PSD via Java
Build your own Java apps to watermark PSD files using server-side APIs.
How to Watermark PSD File Using Java
In order to watermark PSD file, we’ll use
API which is a feature-rich, powerful and easy to use watermarking API for Java platform. You can download its latest version directly from
and install it within your Maven-based project by adding the following configurations to the pom.xml.
<repository> <id>AsposeJavaAPI</id> <name>Aspose Java API</name> <url>https://repository.aspose.com/repo/</url> </repository>
<dependency> <groupId>com.aspose</groupId> <artifactId>aspose-psd</artifactId> <version>version of aspose-psd API</version> <classifier>jdk17</classifier> </dependency>
Steps to Add Watermark to PSD via Java
- Load PSD with Image.Load method. Cast it into a PsdImage
- Create an instance of Graphics from the image.
- Define & set Font, Brush and Format for watermark text
- Draw watermark using drawString(…) function
- Save image to disc
Aspose.PSD for Java supports on all major platforms and Operating Systems. Please make sure that you have the following prerequisites.