GroupDocs.Watermark for Java

Create Custom Watermarks in Word Documents

Secure your Word files with Java by embedding tailored text or image watermarks. This resource is ideal for those needing to enhance document security and visual appeal with minimal effort.

Add Watermark to Word 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 Word 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 WORD

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

// 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.docx");
<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 enables precise and flexible watermark creation in Word documents. This tool empowers Java developers to add customized watermarks that can include text, images, or logos, tailored to your specific branding needs. It supports all major Word document formats and provides comprehensive features for editing and removing watermarks, as well as searching through documents to verify watermark integrity. Compatible with all Java-supported operating systems, this API is perfect for businesses looking to reinforce their document security protocols.
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.

Personalize Your MS Word Files with Java Watermarks generation

GroupDocs.Watermark for Java allows developers to easily insert tailored text or image watermarks into Word documents. These enhancements not only boost document security but also enrich business communications with a professional touch.

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