The draftwatermark
package implements a few simple commands for adding watermarks to documents. It provides some flexibility that is sufficient in most cases.
A basic example:
\usepackage{draftwatermark} \SetWatermarkText{Confidential} \SetWatermarkScale{5}
The following 5 properties of a watermark can be modified through commands defined by the package.
Text (default DRAFT):
The following command controls the watermark text:
\SetWatermarkText{Confidential}
To change the text style, e.g. to small capitals, use:
\SetWatermarkText{\textsc{Confidential}}
Color (default 80% gray):
The color is modified through the following command:
\SetWatermarkColor[rgb]{1,0,0}
To change the color to another gray-level, use:
\SetWatermarkColor[gray]{0.5}
The color
package is automatically loaded with draftwatermark
.
Font size (default 5cm (max)):
Changing the font size is decreased as follows:
\SetWatermarkFontSize{2cm}
Scale (default 1.2):
To get a watermark across the whole page, you probably want to set scale to a value somewhere around five.
\SetWatermarkScale{5}
Angle (default 45°):
The text can be rotated to another angel using:
\SetWatermarkAngle{30}
Package options:
The package includes options to control the placement. For a watermark on the first page only, use:
\usepackage[firstpage]{draftwatermark}
The option nostamp
will suppress any watermark.
\usepackage[nostamp]{draftwatermark}
Documentation:
Link to the draftwatermark package documentation.
Example:
\documentclass[11pt]{article} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{draftwatermark} \SetWatermarkText{Confidential} \SetWatermarkScale{5} \SetWatermarkColor[rgb]{0.7,0,0} \begin{document} \blindtext[10] \end{document}
A code-based, but certainly more flexible approach was described by Filox on his blog.