Free Support Forum -

How to convert a document to image and set Watermark color using Java

Hi Team

I am trying to set watermark when converting a document to image.

Watermark is applied successfully on the output image without setColor option. But throws the following exception when setting color:

com.groupdocs.conversion.internal.c.a.i.internal.Exceptions.e: Specified argument was out of the range of valid values.
Parameter name: name
at com.groupdocs.conversion.internal.c.a.i.f.a(Unknown Source) ~[groupdocs-conversion-17.3.0.jar:1.0_01]
at com.groupdocs.conversion.internal.c.a.i.f.V(Unknown Source) ~[groupdocs-conversion-17.3.0.jar:1.0_01]

Code to set color:

WatermarkOptions watermarkOptions = new WatermarkOptions(“Watermark text”);
Color watermarkColor = new Color(100, 175, 75);

Gradle Version:


Thank you


Thanks for your inquiry. We successfully reproduced this issue at our end. Hence, it’s been logged in our internal issue tracking system with ID:CONVERSIONJAVA-426. As there’s any update, we’ll apprise you.

Thank you for the quick reply. We are currently evaluating GroupDocs. So have few more queries. Will open separate topics for that.

Awaiting update on CONVERSIONJAVA-426.


You are welcome to post further queries.


We are pleased to apprise you that your reported issue is resolved in 17.7 version of the API. You can download this latest version of the API here. If you face any other issue(s), please let us know.