How to set Watermark Color in PDF with PHP using GroupDocs.Viewer REST API

@tilal.ahmad
I’m facing 1 more issue with Viewer API

  $watermark = new GroupDocs\Viewer\Model\Watermark();
  $watermark->setText("This document is licensed to");
  $watermark->setSize(80);
  $watermark->setPosition('BottomCenter');
  **$watermark->setColor("pink");**
  $viewOptions->setWatermark($watermark);

The watermark color is always red, no matter what I specify. There must be some issue with this.
Thank you,
Gopal

@gopalsharma

Please try following color name or RGB code for Pink Color. It is working fine at my end.ColorTest.pdf (47.4 KB)

//$watermark->setColor("(255,192,203)");
$watermark->setColor("Pink");

1 Like

@tilal.ahmad
This is working as expected.
Thank you so much.

1 Like