GroupDocs.Watermark for Java

Images Watermarking Seamlessly in Java

Implement dynamic watermarks in your image files using Java. This tool allows for precise positioning, scalability, and transparency adjustments to enhance security and brand recognition.

Add Watermark to Image 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 Image 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 IMAGE

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

// 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.jpeg");
<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 GroupDocs.Watermark for Java enables developers to effectively generate and manage watermarks on image files. With support for a wide range of image formats, users can implement both text and graphic watermarks that are fully customizable in position, scale, and transparency. This functionality is critical for applications in digital media, advertising, and online content distribution, where branding and copyright integrity are paramount. Additionally, GroupDocs.Watermark includes features to search for and remove existing watermarks, providing a versatile tool for image management and security.
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.

Streamline security Images with Watermarking in Java

Our Java toolkit enables the generation of personalized watermarks for any image format, enhancing security and branding. Tailored watermarks ensure your visuals are recognized and protected across various media.

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