Watermarks in reports
You can add your own custom texts as watermarks in reports in the Report JSON file. Watermarks can be defined either globally for all documents in the request or at the document level - for each individual document.
Note: A watermark defined at the document-level will take precedence over any globally defined watermarks.
The watermark custom text is defined in the Watermark parameter while the watermark styling is defined using the WatermarkStyle parameter.
Watermark parameter
When you define the watermark text, you must include the text in quotation marks like this:
Watermark: "Draft Version"
WatermarkStyle parameter
Watermark text can be styled using the following style options:
- Color: The color of the watermark text. Enter any valid html string format such as standard color name, hex value, and RGB colors. For example: Standard color name: Red or Hex value: #FF0000 or RGB: 255,0,0
- Transparency: The transparency level of the watermark text. Most watermark text is faintly transparent to avoid overshadowing the main document text. Enter a value between 0 (not transparent) and 100 (completely transparent)
- Font: Enter a font name. The font must be accessible on the machine running the report. You do not need to specify font size as the watermark will automatically be re-sized to fit the page.
Example: Watermark and WatermarkStyle
{
"Watermark": "Global Watermark",
"WatermarkStyle": { "Color": "Black", "Transparency": "33", "Font": "Verdana"},
"Documents": [
{
"Uri": "file:///d:/AnnualReport.msg",
"Title": "Custom title",
"Watermark": "Local Watermark",
"WatermarkStyle": { "Color": "Cyan", "Transparency": "40", "Font": "Arial"}
}]
}
In this example, the global watermark "Global Watermark" is superseded by the "local Watermark" watermark on the local document. Note the formatting is also changed for the watermark of the local document.
