About these ads

Watermarks: Draft, Review, Approved, Confidential

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.

About these ads

13 Responses to “Watermarks: Draft, Review, Approved, Confidential”

  • Thanatos

    It’s a really good tip, but I have a question.

    How can I add a image watermark?.

    I need to make a template letter for company, but need the logo behind the text.

    Thank you for your posts.

    Best regards.

    • tom

      Hi Thanatos,

      Thanks for that question. Yes, you can add an image instead of text using includegraphics:

      \SetWatermarkText{\includegraphics[width=\textwidth]{figure.file}}

      The graphicx package is required by draftwatermark and therefore, you won’t need to load it again.

      Best, Tom.

  • flsantos

    Reblogged this on g3t conn3ct3d and commented:
    Nice post, just rebloging

  • Sarvesh

    Dear Tom, Thanks for this.
    Could you please help me What command should i use in order to place text message i.e. “Under Review” in the every page background in my IEEE survey paper.

    Thanks and Regards
    Sarvesh

    • tom

      (Moved here by Tom.)

      Hi Sarvesh,

      The draftwatermark package (documentation) would be one way to add watermarks. Here is some sample code to play with:

      \usepackage{draftwatermark}
      \SetWatermarkText{Under Review}
      \SetWatermarkScale{5}

      Cheers,
      Tom.

  • Sarvesh

    Dear Tom,

    Today i have tried these code:

    \usepackage{graphicx}
    \usepackage{type1cm}
    \usepackage{eso-pic}
    \usepackage{color}
    
    \makeatletter
    \AddToShipoutPicture{%
                \setlength{\@tempdimb}{.5\paperwidth}%
                \setlength{\@tempdimc}{.5\paperheight}%
                \setlength{\unitlength}{1pt}%
                \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
            \makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.75}%
            {\fontsize{6cm}{6cm}\selectfont{DRAFT}}}}%
                }%
    }
    \makeatother

    Draft is appearing for every pages but while compiling it was showing following types of Latex Warning and so failed to display all my tables and figures.
    LaTex Warning: Reference ‘table:nonlin’ on page 1 undefined on input line 168.
    ! Too many }’s.
    \color@endbox ->\color@endgroup \egroup
    1.99 \end{table}
    ?

    Please help me to short out the above mention problems.

    With regards
    Sarvesh

    • tom

      Hi Sarvesh,

      You probably just have to make sure you get the number of curly brackets right. Count how many you opening and closing brackets. It seems that you don’t need the last two “}”, just try.
      Also you seem to reference a table that has either no label or the spelling is different (warning).

      I will move your comments to a post where they seem to fit and block comments for this page. This is to benefit others who are having the same or similar problems.

      Best, Tom.

  • Raul (@reoojr)

    Hi Tom, Your blog is awesome!!!

    When I was compiling my water.tex, I get this error:

    “Undefined control sequence”

    The mistake is in this line:

    \SetWatermarkColor[rgb]{0.7,0,0}

    I don’t know why? I have read through Google, but I haven’t found any answer. Well, Here is my source code for water.tex

    \documentclass[a4paper,11pt]{report}
    \usepackage[T1]{fontenc}
    \usepackage[utf8]{inputenc}
    \usepackage{lmodern}
    \usepackage{blindtext}
    \usepackage{draftwatermark}
    \SetWatermarkText{WaterMark}
    \SetWatermarkScale{1}
    \SetWatermarkColor[rgb]{0.7,0,0}
    \title{Watermarks}
    \author{All the blogs}
    \begin{document}
    \maketitle
    \tableofcontents
    \chapter{This is a test}
    In this document, you can see a watermark :D 
    \end{document}

    Greetings

    • tom

      Hi Raul,

      Thanks for your command and the minimum working example. Running the code does not produce an error in my editor though. I suspect you don’t have the latest version of the package. According to the documentation colored watermarks were only added at the beginning of this year (Jan 2012). I suggest updating your LaTeX distribution.

      Let me know if that didn’t help.

      Best, Tom.

      • Raul (@reoojr)

        Hi Tom!

        I didn’t read the documentation, but in your comment, I can see the date of the update (Jan 2012). I think that’s my problem. I’m using Debian GNU/Linux, sqeeze. I’m going to try update my packages manually because with a ‘apt-get update’ doesn’t find any update.

        Thanks for your rapid answer.

        Greetings from Mexico

      • tom

        Hi Raul,

        Hope updating you distribution / the package will fix the problem. Good luck!

        Tom.

  • Lan

    Hi,
    I tried to use this package with a “letter” class (actually “lettre”) instead of an “article” class but it did not work.
    Any idea to solve the problem?
    Thanks!
    Lan

    • tom

      Hi there,

      There seems to be a problem indeed. The class lettre somehow uses a different page layout. I can see the watermark, but its shifted to the top-right corner. It works with the letter documentclass, so maybe you want to consider changing documentclass. I will get back to you if I can think of any work-around.

      Cheers, Tom.

      \documentclass[11pt]{lettre}
      
      \usepackage[latin1]{inputenc}
      \usepackage[T1]{fontenc}
      \usepackage[french]{babel}
      \usepackage{draftwatermark}
      \SetWatermarkText{Draft}
      \SetWatermarkScale{15}
      \SetWatermarkAngle{45}
      
      \begin{document}
      \begin{letter}{}
      Letter goes here
      \end{letter}
      \end{document}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 714 other followers

%d bloggers like this: