Skip to main content

Section 26.5 Watermarks

Output can contain a watermark, which is prominent text in the background of a document. You might use it to make a draft version (with a date?), or a CONFIDENTIAL version, or a document intended for limited distribution, such as an instructor's solution manual.

In PDF output this text will render as large, light grey text, at an angle across the page. HTML output will have repeated SVG images of the text below/behind the usual text.

To use, a publication file entry can be used to specify the text itself, along with a scaling factor that can be used to fill the page and prevent overruns. Note that the text is assumed to be simple (e.g. no markup) and when used with output certain characters (e.g. a percent sign) may cause problems. Make a feature request if the handling of this text needs to be more robust. See Subsection 43.1.6 for exact syntax.

Here is an example of a specification in the publication file.

  <watermark scale="1.2">DRAFT 2034-05-25</watermark>