Watermark Capabilities
The Watermark capability, introduced in TallyPrime Release 7.1, allows developers to display custom watermarks in Forms. Watermarks can be configured as either text or images and customized using attributes such as Type, Info, Watermark Size, Color, Alignment, Opacity, and Use.
Watermarks can be used to display information such as Draft, Cancelled, Duplicate, company branding, or other visual indicators in display and print scenarios.
Definition – Watermark
Use a Watermark definition to specify a watermark in a Form. You can configure it as Text or Image using the supported attributes.
Syntax
[Watermark : <Watermark Name>]
Where, <Watermark Name> specifies the name of the Watermark definition.
Watermark Attributes
Type
The Type attribute specifies the type of watermark.
Syntax
[Watermark : <Watermark Name>]
Type : <Type>
Where, <Type> specifies the watermark type.
Supported values: Text / Image.
Info
The Info attribute specifies the watermark content.
Syntax
[Watermark : <Watermark Name>]
Info : <Value>
Where, <Value> specifies the text to display for a text watermark or image path/reference for an image watermark.
Watermark Size
The Watermark Size attribute specifies the size of the watermark.
Syntax
[Watermark : <Watermark Name>]
Watermark Size : <Size Value>
Where, <Size Value> specifies the watermark size.
Color
The Color attribute specifies the text color for a text watermark.
The Color attribute is used to specify the text color of a watermark. The color must be provided as an expression that evaluates to comma-separated RGB (Red, Green, Blue) values.
If this attribute is not specified, the watermark uses the default foreground color of the active theme.
Syntax
[Watermark : <Watermark Name>]
Color : <RGB Expression>
Where, <RGB Expression> is an expression that evaluates to comma-separated RGB values in the format “R, G, B”.
Alignment
The Alignment attribute specifies the alignment of the watermark.
Syntax
[Watermark : <Watermark Name>]
Alignment : <Alignment Type>
Where, <Alignment Type> specifies the watermark alignment.
Supported values: Horizontal / Diagonal.
Opacity
The Opacity attribute specifies the watermark’s transparency level.
Syntax
[Watermark : <Watermark Name>]
Opacity : <Opacity Value>
Where, <Opacity Value> specifies the opacity of the watermark.
Use
The Use attribute is used in a Watermark definition to reuse an existing Watermark definition.
Syntax
[Watermark : <Watermark Name>]
Use : <Watermark Name>
Where, <Watermark Name> specifies the name of the Watermark definition.
Example
[Watermark : Text Watermark]
Type : Text
Info : “Watermark”
Watermark Size : 20
Color : 255,0,0
Alignment : $$SysName:Horizontal
Opacity : 20
This configuration displays the word “Watermark” with a size of 20, across the form in red color, with a horizontal layout and a light (semi-transparent) appearance.
- Type: Text – Defines the watermark as a text watermark.
- Info: “Watermark” – Displays the text Watermark as the watermark content.
- Watermark Size: 20 – Sets the watermark text size to 20.
- Color: RGB value “255, 0, 0” – sets the watermark text color to red.
- Alignment: Horizontal – Places the watermark in horizontal orientation.
- Opacity: 20 – Makes the watermark semi-transparent with 20% opacity.
