GroupDocs.Watermark for Java API

Adjust SpreadSheets Watermarks Tool: Powerfully Simple

Enhance your documents with our intuitive watermark editing tool. Simplify your workflow effortlessly.

Adjust watermarks in Excel documents with Java

GroupDocs.Watermark for Java makes it easy for Java developers to adjust text watermarks in their applications by implementing a few easy steps:

  1. Load your Excel file to the main object of our API called Watermarker. You can provide file for the further processing as stream or as a path on a local disk.
  2. Next step is locating watermarks which must be adjusted. SearchCriteria helps as to identify watermarks with right properties which were previously added to a document.
  3. Get list of suitable watermarks as a result of the Search procedure. Adjust found watermarks properties such as size, page alignment, text, color, image content, etc. There are a lot of ways to customize your data.
  4. After completion of watermarks adjustment process you need to save updated document. Use local file path, file or byte stream to store result.

// Adjust EXCEL text watermark

// Instantiate Watermarker with input EXCEL document
Watermarker watermarker = new Watermarker("input.xslx");

// Initialize the TextSearchCriteria and find text watermarks
TextSearchCriteria searchCriteria = new TextSearchCriteria("test", false);
PossibleWatermarkCollection watermarks = watermarker.search(searchCriteria);

// Adjust text watermark properties
for (PossibleWatermark watermark : watermarks)
{
    watermark.getFormattedTextFragments().clear();
    watermark.getFormattedTextFragments().
        add("passed", new Font("Calibri", 19, FontStyle.Bold), Color.getRed(), Color.getAqua());
}

// Save the updated document
watermarker.save("output.xslx");
<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

Deep dive into EXCEL Watermark adjustment

Our API empowers Java applications to add, edit, remove, and search for watermarks across popular document formats.

Adjust Watermark

Effortlessly Watermark Your Documents

GroupDocs.Watermark simplifies watermarking for Java developers. Add diverse watermarks to various business documents and files. Not only can you apply watermarks, but you can also update or remove existing ones.

Customize Watermarks to Your Needs

Our API provides extensive customization options. Easily adjust size, rotation, color, font, styles, and more to achieve the perfect watermark.

Use EXCEL Native Document Features

Depending on the specific document format, you can utilize native functionalities. These might include document page background, annotations, headers, or other objects as watermark containers.

PDF adjust text watermark

This example shows how to adjust the text of the particular artifacts.

Java


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

//  Get document content
PdfContent pdfContent = watermarker.getContent(PdfContent.class);

//  Adjust particular watermark text
for (PdfArtifact artifact : pdfContent.getPages().get_Item(0).getArtifacts())
{
    if (artifact.getText().contains("Test"))
    {
        artifact.setText("Passed");
    }
}

//  Save the document
watermarker.save("result.pdf");
watermarker.close();

GroupDocs.Watermark for Java API

Watermark Adjustment Tool: Our watermarking tool offers a user-friendly solution to enhance and protect your documents. With intuitive editing features, managing watermarks becomes effortless, ensuring document security and authenticity.
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.

Adjust Watermark via GroupDocs.Watermark for Java for other formats

Customize watermarks across a wide range of document formats with ease. Enhance document security and authenticity effortlessly.

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