Watermark demo

Hi,

I’m trying to use the code of the watermark demo (in words). I have a problem since in the code, you use the setColor method on Shape object :

Shape watermark = new Shape(doc, ShapeType.TEXT_PLAIN_TEXT);
watermark.getFill().setColor(Color.GRAY);
watermark.setStrokeColor(Color.GRAY);

The expect object is of type Color but I cannot a Color class in words API.

I am using Aspose.Total for Java, downloaded yesterday from your site.

How can I fix this ?

thank you !

Boris

Hi Boris,

Color class is available in com.aspose.cells.Color package.
Make sure to import following package: import com.aspose.cells.Color;
Don't forget to download and add the reference of aspose-cells-7.0.1.jar

I also want you to read known issues in aspose words for Java.
http://www.aspose.com/documentation/java-components/aspose.words-for-java/known-issues-in-aspose-words-for-java.html


Regards,
Imran Rafique

thank you for your answer,

It was in fact the java.awt.Color. A quick look to the API gave me the info.

Sorry for the noise and thank you for taking time to answer me !

boris