PDF Watermarking

From Drumlin Security Wiki
Jump to navigation Jump to search


Watermarks on standard PDFs are essentially text and/or graphics that are included as part of the PDF document itself, i.e. they are editable elements that form part of the page content on one or more pages of a document. They can be placed in a range of positions on the page. In the original 1.7 version of the standard watermarks are described as annotations:

A watermark annotation (PDF 1.6) shall be used to represent graphics that shall be printed at a fixed size and position on a page, regardless of the dimensions of the printed page. Watermark annotations shall have no pop-up window or other interactive elements.... When displaying a watermark annotation on-screen, conforming readers shall use the dimensions of the media box as the page size so that the scroll and zoom behavior is the same as for other annotations.

Many PDF documents include a copyright statement at the start of the document and/or in running footers. In addition, Static and Dynamic Watermarks may be added to provide a level of document security. With Adobe-style "static" watermarks many tools exist for watermark removal, so this kind of watermark only provides additional security if included in a DRM protected encrypted PDF (see further below) where the document cannot be decrypted. Dynamic watermarks are typically displayed when the document is viewed and use variables to identify things like the username, their device and the date and time. In this case the security provided is strong because the watermark cannot be removed. This Wiki page addresses watermarking of PDF documents and secure PDF documents that are displayed in a local (offline) PDF reader environment. Web-based display of PDF files and converted (HTML5) PDF files have a similar range of options for display of static and dynamic watermarking.

A summary of watermarking options can be made as listed below:

  • MANUAL EDITING: On Page watermark, Static text
  • AUTOMATED EDITING: On Page watermark, Static text, Stamping
  • AUTOMATED OVERLAY: Overlayed on target media, not edited as part of pages
    • On Window (Screen), Static text and/or Dynamic content
    • On Page (print only), Static text and/or Dynamic content

Static watermarks

Static watermarks are created typically using a PDF editing tool such as Adobe Acrobat or A-PDF to create additional foreground or background items on some or all pages of a PDF. The screenshot below illustrates this using Adobe Acrobat XI, and as can be seen, the text entered appears on the selected page – here as a simple text string, in the color, size and orientation selected. Adobe Acrobat and A-PDF are very flexible in providing options for statically added watermarks of this type. Once added the PDF must be saved, so that the additional content forms a permanent part of the PDF file itself. If this file is then protected, using Adobe’s standard security facilities, preferably with a longish password (8+ alpha-numerics) then the watermarking will have a reasonable level of protection against removal. Note that the watermark can contain any statically defined information you wish, so can be generic, e.g., “(c) My Company, 2019”, or “! This file has been issued to Mr A B Johnson of XYZ Inc – no copying of this file is permitted”.

Standard watermark settings form

Dynamic watermarks

The second approach is the use of dynamic watermarking. As with static watermarking a dynamic watermark can contain static text, such as “(c) My Company 2019”, but that misses the real value of such facilities. The main feature of a dynamic watermark is that it includes information that includes (additional) end user or other information that makes the file “unique” and identifiable, hence offering a greater degree of protection against copyright abuse.

Some web services that provide PDF downloads within an e-commerce framework provide the option to "dynamically stamp" the purchased PDF with user details, prior to making it available for downloading. This personalizes the item but does not secure it. For more details see for example: PDF stamping

With the DrumlinPublisher and Javelin reader software two types of dynamic watermarking are supported, both being secure:

(i) The standard form of dynamic watermarking generally appears as overlaid text on the viewed display area or on the page when printed (where printing is permitted). In this type of watermarking the source PDF document is not changed, but the relevant watermark is displayed on-screen or on-print in real time
(ii) With the DrumlinPublisher "Personalization" facility a more detailed, personalized watermarking is possible, for one or many target users

Each option is described below.

Standard Overlaid Watermarks

With this option the selected static and dynamic components of the watermark are generated at the moment of display or printing. The selectable dynamic fields are identified using the % prefix and a letter (in upper or lower case) and include the following dynamic fields: %F filename, %M machine name, %C documentID, %U username, %I machineID, %D date, %T time, %a authorization code; and for Javelin3Pro only (as this version of Javelin3 has the information in question from their registration details) %N firstname, %L Lastname and %E email address. In all cases the % fields are only completed where the data is available from the device or registration, otherwise they are left blank.

In general, secured PDF files will be displayed on screens rather than printed, and in such cases the watermark will be shown at the top and bottom of each page or screen window area (on desktop and laptop devices), or at the foot of the page or screen area for mobile devices - phones and tablets. An example is illustrated below. The text is always displayed horizontally and in a fixed font, color and transparency. In the example shown, the dynamic watermark was specified as (c) %a / %u

Dynamic watermark display

Where printing is permitted, additional settings are supported. These specify the font size, opacity, color, orientation and relative position on the page of the watermark to be applied. This is not an exact science (!) and tests should be carried out before applying the settings. Typical settings would be a diagonal or vertical display, 50mm from the top and 50mms from the left edges of the page, with a low opacity (e.g., 25%) and selected color (e.g., dark blue) and fontsize, and applied to All pages or a range of pages. Multi-line watermarks are supported by inclusion of a % and vertical bar symbol in the watermark where a line break is required (%|). PDF files with variable page sizes and orientations can present problems for such watermarks, and it may be necessary to amend the source file or to use an alternative approach in these cases.

There is also a special case supported by DrumlinPublisher that enables the on-screen display of diagonal watermarks in a format similar to on-print dynamic watermarking. The feature is implemented as follows:

(i) select a PDF and choose the option to add a watermark (e.g., a diagonal watermark with 40pt font etc.)
(ii) on the Watermark tab, tick the boxes for both on-screen and on-print watermarking, even if your file setting is not to allow printing (as specified on the Permissions tab)
(iii) create the drmz file and open it using Javelin3 for Windows - the watermark will be shown with the print-related settings you have selected - the attached screenshot illustrates this for a test document

Dynamic watermark display - special case

In the final example of standard watermarking illustrated below (displayed in the older Javelin v2 Windows reader software) there are both static and dynamic watermarks included. The static watermark has been added to the source document using Adobe Acrobat – in this case it has been placed at a diagonal angle across the text in such a way as to extend across the page but with minimal interference with the text. The dynamic watermark, created using DrumlinPublisher, is shown at the foot of the page, and includes information about the file displayed (the filename itself), plus information that identifies the user (via the partially displayed code), the device on which the document is displayed, the date and other information. This information is dynamically generated when the file is displayed and is overlaid onto this viewable screen window rather than embedded in the document. This means that when the page is zoomed in or out, the dynamic watermark is always displayed in front of the viewable area. This provides an added level of protection for the document against screen capture that is now a standard feature of many operating systems and hardware devices. There are also a range of server-driven tools and PDF security products that will automatically "stamp" or watermark PDF files that are downloaded.

Dynamic watermark display

Personalized Watermarks

Personalized watermarks can be added to standard (un-protected) PDF files by manually editing the PDF or via an automated 'stamping' process as described above. However, neither of these options provides security of the personalization or for the document itself. Within the Drumlin services these limitations can be overcome using the DrumlinPublisher "Personalization" option (available as standard with current versions of DrumlinPublisher).

Personalization is a facility that enables single or multiple secure PDF files to be generated automatically from a single source PDF, with each generated secure file being given a unique filename, personalized watermark, and optionally a unique document authorization code.

The facility is accessed using the Personalization tab in DrumlinPublisher. It includes three additional watermark field "placeholders": %1 %2 and %3 – these correspond to the 3 fields in the list of names in a Personalization csv file. The csv file will contain a number of separate lines, with 3 unique personal entries per line, separated by commas, for example

Fred Bloggs,CompanyA,fredbloggs@companya.com
John Smith,CompanyA,john smith@companyb.com
Peter Pan,CompanyC,peterpan@companyc.com


These fields can be combined in the watermark with standard dynamic fields such as %a and %F using the Watermark tab.

The steps are as follows:

1. Check the "enable personalized file" creation option is ticked
2. Select a single file to convert to secure DRMZ or DRMX format on the Select Files tab
3. Select the destination folder for the personalized output files on the Select Files tab
4. Specify your dynamic stamping watermark, e.g. (c) 2022 ABC Inc %1 %2 %3 %a on the Add Watermarks tab
5. Select the CSV file, containing the data to be used for each of the personalized output files (this file can be created within the DrumlinPublisher software if required)
6. Select Create Code List if you require an automatically generated unique code for each file plus the usage count for each code
7. Press Create Secured PDFs to create your files from the CSV file

The result will be a series of separate uniquely named and personalized secure PDF files (drmz files), each with personalized watermarks that cannot be removed. This facility is the most powerful and secure watermarking option.

Web Viewer Watermarking

Many of the observations above also apply to PDF files displayed within a web-based viewer, such as the ones provided as part of the Webdoxx services. Where the source document includes a static watermark, the web-displayed version will include that watermark since it forms part of the source file. However, the most common arrangement is for watermarking to be provide as an overlay to the viewed window. Typically, this is provided in a fixed location towards the foot of the displayed area and will include a mix of static and dynamic content. However, the font, font size, position and transparency of overlaid watermarks can be tailored to meet specific preferences by publishers. In the case of the Webdoxx services, there is a standard watermark overlay, and one or more optional bespoke formats. The standard watermark is positioned 50 pixels (px) above the foot of the display and includes the following fields:

$slname: the logged-in username as recorded in the user management system $slaccesstime: the date and time when the display is made $ip: the IP Address of the device that is being used to access the service

but other static and variable data may be included, e.g., the organization name, the user's email address, the name of the file being accessed, etc.