GroupDocs.Watermark for Java

Efficient Java Tools for Photo Watermarking

Add watermarks to your photos quickly and efficiently using our Java API. Perfect for securing digital images and enhancing brand visibility with minimal effort.

Add Watermark to Photo Document via Java

GroupDocs.Watermark for Java makes it easy for Java developers to add watermarks of various types to popular business file formats. Add our library to your application and watermark documents in a few easy steps as listed below.

  1. The main class of our API is Watermarker. You need to instantiate it before document processing. Do not forget to pass the Photo file to the constructor as a path or a stream object.
  2. The next step is constructing a Watermark object of the desired type. It can be placed not only on a specific document page but also in native document parts like attachments or headers.
  3. Set watermark properties such as height and width, page alignment (top, left, central, etc.), font family and color, and many others.
  4. Call the Watermarker method to add a new watermark. You can add as many watermarks as you need. It is recommended to save the processed document to another location.

// Add text watermark to PHOTO

// Pass file to be watermarked to Watermarker
Watermarker watermarker = new Watermarker("input.png");

// Create text watermark and set up properties
TextWatermark watermark = new TextWatermark("My Watermark", new Font("Arial", 36));
watermark.setForegroundColor(Color.getRed());

// Save watermarked file
watermarker.add(watermark);
watermarker.save("output.png");
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-watermark</artifactId> <version>24.8</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

Enhance Your Watermarks Easily

Harness the power of GroupDocs.Watermark to generate, compose, and add watermarks across multiple document formats. This API not only enhances document security but also protects your intellectual property by embedding customizable watermarks that are both versatile and robust.

Add Watermark

Versatile Watermark Options

Explore a wide range of watermarking options with GroupDocs.Watermark. From adjusting opacity and rotation to scaling size proportionally, our API lets you customize watermarks precisely to your needs, ensuring that they blend seamlessly with your documents while maintaining content integrity.

Advanced Watermark Styling

GroupDocs.Watermark allows you to style your watermarks with various fonts, colors, and shadows, making them distinctive and harder to remove. Enhance the aesthetic appeal of your protected documents and images with stylish watermarks that reflect your brand’s identity and professionalism.

Watermark Tiling & Positioning

With GroupDocs.Watermark, implement tiling effects to cover your entire document, ensuring complete protection. Position watermarks exactly where you need them—center, corner, or custom locations. Our flexible positioning options help safeguard your documents against unauthorized use and duplication.

PDF annotation watermark

This example shows how to add watermark annotation to a PDF document

Java


//  Load document as PDF
PdfLoadOptions loadOptions = new PdfLoadOptions();
Watermarker watermarker = new Watermarker("source.pdf", loadOptions);

//  Create watermark based on PDF annotation
PdfAnnotationWatermarkOptions options = new PdfAnnotationWatermarkOptions();
TextWatermark textWatermark = new TextWatermark("Annotation watermark", new Font("Arial", 8));

//  Set up watermark options
textWatermark.setHorizontalAlignment(HorizontalAlignment.Left);
textWatermark.setVerticalAlignment(VerticalAlignment.Top);

//  Add text watermark to result document
watermarker.add(textWatermark, options);
watermarker.save("result.pdf");

GroupDocs.Watermark for Java

GroupDocs.Watermark for Java is optimized for fast and effective watermarking of photo files. This tool enables rapid integration of text and image watermarks into a wide range of photo formats, including JPEG, PNG, and BMP. Customize your watermarks with extensive options for style, transparency, and placement to ensure they blend seamlessly without detracting from the photo quality. Suitable for high-volume operations, it supports batch processing to apply watermarks to multiple photos at once, making it ideal for businesses and digital content creators who need to protect and brand their visual assets efficiently
Learn more
About illustration

Ready to get started?

Download GroupDocs.Watermark for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Rapid Watermark Integration for Photos via Java

Leverage our Java API to quickly apply watermarks to photos, enhancing security and brand identity. Automated processes allow for mass application, ensuring consistent and professional results.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English