Skip to main content

Add Watermarks to a Report

  • 4 minutes to read

DevExpress Reporting allows you to display text and picture watermarks on report pages. You can also specify an expression that assigns different watermarks to pages.

This tutorial includes information about the following tasks:

  • How to add watermarks.

  • How to specify watermark settings.

  • How to use pre-printed forms.

  • How to define watermark accessibility settings.

Report with watermarks applied

Add a Watermark to a Report

Switch to the Properties panel and expand the Watermark node in the Appearance category. Click the Add button to create a watermark.

Watermark properties panel

Specify watermark options, depending on the type of watermark you wish to add.

Specify Text Watermark Settings

  • Watermark Id

    The unique identifier of a watermark used to specify the watermark in the WatermarkId property (See the Manage Watermark Collection section for details).

  • Font Name

    The font of the watermark’s text.

  • Size

    The size of the watermark’s text.

  • Unit

    Specifies text measurement system.

  • Bold

    Formats the watermark’s text as bold.

  • Italic

    Formats the watermark’s text as italic.

  • Foreground Color

    The foreground color of the watermark’s text.

  • Text

    The watermark’s text.

  • Text Transparency

    The transparency of the watermark’s text.

  • Text Direction

    The incline of the watermark’s text.

  • Text Position

    Specifies whether a watermark should be printed behind or in front of page content.

  • Page Range

    The range of pages which contain a watermark.

  • Role

    Specifies the role of a text watermark in the exported PDF document. This value is used by assistive technologies.

  • Description

    Specifies the description of a text watermark used by assistive technologies.

The added watermark is automatically displayed in the report in Preview mode.

Specify Picture Watermark Settings

  • Watermark Id

    The unique identifier of a watermark used to specify the watermark in the WatermarkId property (See the Manage Watermark Collection section for details).

  • Image Source

    Specifies the image that you wish to use as a watermark.

  • Image Position

    Specifies whether a watermark should be printed behind or in front of page content.

  • Image Transparency

    The transparency of the watermark’s image. The Transparency property is unavailable when you specify an SVG image.

  • Image View Mode

    The mode in which a picture watermark is displayed.

  • Image Tiling

    Specifies whether a picture watermark should be tiled.

  • Image Alignment

    Specifies the horizontal or vertical alignment of the watermark.

  • Page Range

    The range of pages which contain a watermark.

  • Role

    Specifies the role of an image watermark in the exported PDF document. This value is used by assistive technologies.

  • Description

    Specifies the description of an image watermark used by assistive technologies.

The added watermark is automatically displayed in the report in Preview mode.

Supply a Preprinted Form

You can use a picture watermark as a template, to display an image of the preprinted form on the report’s body at design time.

To display a watermark at design time, expand the Design category and enable the Draw the Watermark property.

Draw watermark property

The following image illustrates a report with a watermark shown at design time that contains a template of a preprinted form.

Template watermark at design time

Place report controls on the report’s body according to the layout of the preprinted form.

Controls on template watermark

Supported Image Formats

A picture watermark supports the following formats:

  • BMP
  • JPG / JPEG / JPE / JFIF
  • GIF
  • TIF / TIFF
  • PNG
  • ICO
  • DIB
  • RLE
  • EMF / WMF
  • SVG

Combine Text and a Picture in One Watermark

You can display both text and a picture in one Watermark. Use the Text Position and Image Position options of the watermark to specify whether the text and picture should be displayed behind or in front of page content.

For example, create a watermark and specify its text and picture settings. Set position of the text to InFront and position of the picture to Behind:

As a result, the image is displayed behind the table, while the text is in front of the content:

Combined text and image watermark

Display Watermarks According to the Specified Condition

Bind the report’s Watermark Id options to an expression to apply watermarks stored in the collection to specific report pages. This option allows you to apply a specific watermark to a page based on the Watermark Id or expression binding.

Watermark Id property

For example, the following expression adds the created “First page watermark”, “Even page watermark”, and “Odd page watermark” watermarks to the first, odd, and even pages of a report:

Iif([Arguments.PageIndex]=0,'watermark1',Iif([Arguments.PageIndex]%2=0,'watermark2','watermark3'))

Conditional watermarks on pages

Watermark Accessibility Settings

Use the following options to specify whether to include report watermarks in the logical structure of exported PDF documents:

  • For image watermarks that convey meaningful information, set the Role property to Figure and use the Description property to specify alternative text.

  • For text watermarks, set the Role property to Paragraph and use the Description property to specify alternative text.

For purely decorative watermarks, retain the default value to treat the watermark as an artifact.