15 Comments

  1. 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.

    • 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.

  2. 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

    • (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.

  3. 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

    • 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.

  4. 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

    • 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.

      • 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

  5. 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

    • 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