Add Watermark to Documents in SharePoint

In this guide you’ll learn how to apply watermarks to documents using the standard SharePoint user interface. This allows watermarks to be applied to Documents and List Item attachments, and even supports the application of custom, user-specific watermarks when a document is opened, something that cannot be achieved by any other means.

Note: By default, the MS SharePoint screens associated with this watermarking feature are disabled. They can be activated by enabling the Muhimbi PDF Converter - Automatic Document Processing User Interface Feature at either the Web Application or Site Collection level (but not both).

Configuring predefined watermarks at the Site Collection level

To allow the same watermarks to be shared between multiple lists and libraries, the system allows default watermarks to be specified at the Site Collection level using the Site Actions \Watermarking Settings screen.

Note: Specifying ‘default watermarks’ on the Site Collection level does not automatically enable watermarking on a specific Library, It must be enabled separately in a Library.

default watermarks

A different default watermark can be specified for Insert, Update, and Open watermarking events. It is even possible to lock down the look and feel of the watermarks to prevent them from being changed at the list or library level.

Configuring Automatic Watermarking at the List or Library Level

Even though default watermarks can be configured at the Site Collection level, the actual automatic watermarking must be enabled at the individual List or Library level. The relevant screen, Watermarking settings, can be opened from the List or Library’s settings screen.

watermark settings

The Settings screen allows automatic watermarking to be enabled for Insert, Update, and Open events. Each event type can use a separate watermark and selection filter. Different watermark types can be selected, including Text, RTF, Image, PDF, and Composite.

settings screen

Note: Due to limitations in MS SharePoint 2007, automatic watermarking for Insert and Update events is not supported on Document Libraries. They are supported on Lists and in MS SharePoint 2010. You can use Workflows as an alternative.

Merging Dynamic Data into Watermarks

The watermarking framework provided by the PDF Converter for SharePoint comes with a powerful set of merge codes that allow dynamic data to be ‘merged in’ at run-time. For example, using merge codes, you can create a dynamic watermark like this:

PDF Opened by '{REMOTE_USER}' on '{LONG_DATE}' from IP '{REMOTE_ADDR}'

This results in the following watermark:

merging dynamic data into watermarks

Merge codes are not exclusive to the ‘watermark on open’ functionality. There are several other ways that watermarks can be applied, for example, using workflows or using web services.

The field codes however are not always available for a particular interface as, for example, the web service has no knowledge about anything that happens in MS SharePoint, and workflows are not always associated with an HTTP Context. For a full overview of the available merge codes please contact our friendly support team.

Specifying Filtering Criteria when Automatically Applying Watermarks

Similar to the way MS SharePoint views can be filtered to only display certain list items, Muhimbi’s automatic watermarking facility allows filters to be created that determine which documents should be watermarked automatically, and which should not. The possibilities are endless, but some obvious examples are as follows:

  • Apply watermarks to draft documents, but not to approved documents.
  • Always apply watermarks to a document created by a user from a particular domain or authentication provider (e.g. FBA)
  • Watermark a document, based on the current date, for embargoed documents.
  • Enable watermarks on all documents with ‘Confidential’ in the Title.
  • Apply watermarks to minor versions (e.g. 1.3) of a document, but not
    to major versions (e.g 2.0).
  • Only apply watermarks to certain content types.

specifying filter criteria

Fortunately, this powerful functionality is very easy to use. Each watermarking section comes with a separate Filter that contains the following fields:

  • Apply Filter: A simple check box that allows filtering to be toggled. When disabled, watermarks are automatically added to all documents.

  • Field List: A list of fields that can be used to apply filters on e.g. Title, Author, Content Type, etc. This is a ‘sanitized' list similar to the one displayed in SharePoint’s own View filter. Non-sensible ‘for internal use only’ fields are automatically stripped out.

  • Comparison Type: Specify the kind of comparison to use, e.g. ‘is equal to’, ‘is greater than’, ‘contains’, ‘begins with’ etc.

  • Comparison Value: The value(s) to compare the selected field with. Full details are provided below. It is in the Comparison Value field where things become interesting as all comparisons take the underlying type of the column into account. All common data types are supported, specifically:

  • Boolean: True: True, Yes, -1, 1 and False, No, 0 as False.

  • Currency: Allows currency comparisons. Please use numbers only, do
    not specify the currency symbol.

    currency comparisons

  • DateTime: Allows date and time fields to be compared. Enter [Today] (including the square brackets) to compare a date field to the current date, e.g. to apply watermarks to documents modified today. Similarly [Now] can be used to compare a field with the current date and time.

  • Lookup: Compare lookup fields, including lookups that may contain multiple values.

  • User: Compares fields that contain a reference to a user account, e.g. the Modified By field. Filters of this type expect a value recognized by the underlying Authentication Provider. This will usually be in the ‘domain\ user_name’ format, but could also be ‘fbaprovidername:username’.

    Note: Enter [me] (including the square brackets) to evaluate the field against the current user. This allows, for example, watermarks to be added to all documents not created by the current user.

  • Single and Multiple choice fields: Allows single and multiple values to be matched, particularly useful with the ‘contains’ comparison type. Examples and details are provided below.

  • Numerical fields: Carries out numerical comparisons.

  • URL: Can compare fields of type URL.

  • Text: Any text field or custom field type that uses a text-based representation.

Some additional notes of interest:

  • All comparisons are case-insensitive.
  • The filter for the ‘Version’ field accepts the ‘[MajorVersion]’ and ‘[MinorVersion]’ values to distinguish between major (1.0, 2.0) and minor (1.1, 1.2, 2.2) versions. It also allows a specific version number to be specified.
  • When filtering multiple-choice / multi-select fields you can specify multiple values. For example:
    • "Brett;Ben" Contains "Ben" = True
    • "Brett;Jeroen;Ben" Contains “Brett;Ben” = True
    • "Brett;Jeroen" Contains “Brett;Ben” = False
    • “Brett;Jeroen” is equal to “Jeroen;Brett” = True (The sequence in which values are specified does not matter)
  • If a field is deleted from a list after it has been specified in a filter then the filter will always equate to false resulting in the watermark not being applied.
  • It is not possible to specify a Filter for Insert events on a Document Library as the fields do not contain any values at this time. This is not a problem for inserting documents attached to a list.
  • When comparing fields that contain both Date and Time elements (e.g. the Modified Date) against such values as [Today] then please take into account that the value represented by [Today] does not include a time element. Therefore ‘Created Date = [Today]’ will never evaluate to true unless it is midnight. Instead, use ‘Created Date >= [Today]’. For Date fields that don’t include the Time element, e.g. a birthday, this will not be a problem.

Filtering out System Users (e.g. Search indexer)

When using the Watermark On Open facility on a list or library, watermarks are applied every time a file is opened, which is exactly what is expected. However, these watermarks are also applied when the SharePoint Search Indexer opens these files. This places an excessive load on the system (bulk indexing results in bulk watermarking), so it is recommended to exclude certain accounts from the automatic watermarking.

Starting with version 8.4 of the Muhimbi PDF Converter, a PDF real-time settings screen is available from the Site Actions menu. Enter a list of accounts to exclude, the System account is excluded by default.

filtering out system users

Dealing with Watermark Errors

Automatically watermarking documents works great, but in the real-world scenario, there might be some errors generated. In some situations watermarks cannot be applied, either because the document is encrypted, or corrupt, or an unexpected error occurs, e.g. a temporary network error.

Depending on your exact requirements, you need to define how the system should behave under exceptional circumstances like whether the user still needs to be given access to the document, even if watermarks are not able to be added, or if their access to the document be blocked.

Starting with version 10.0 of the Muhimbi PDF Converter, a Real-time settings screen is available from the Site Actions menu. Use this screen to specify if access to the document should be blocked in case of an error, or if the unprocessed (pre-watermarked) document should be passed to the user.

watermark errors

Additional Resources

Knowledge Base Articles


Blog articles

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more