4

I want to put 2 watermarks on one document, but it only prints my last watermark.

I don't want to add 2 lines to 1 watermark. I need 1 going horizontal at the top of my page and one going diagonally across the whole page.

This is what I'm currently using:

\special{!userdict begin /bop-hook{gsave 180 20 translate 90 rotate /Times-Roman findfont 90 scalefont setfont 0 0 moveto 0.7 setgray (HEADER) show grestore}def end}

\special{!userdict begin /bop-hook{gsave 320 100 translate 75 rotate /Times-Roman findfont 180 scalefont setfont 0 0 moveto 0.7 setgray (BODY) show grestore}def end}
1
  • The reason why it only prints the last watermark is that the second special redefines bop-hook, overwriting the previous definition.
    – lhf
    Dec 22, 2015 at 1:42

2 Answers 2

5

You can use eso-pic for this:

enter image description here

\documentclass{article}
\usepackage{eso-pic,graphicx,showframe}% http://ctan.org/pkg/{eso-pic,graphicx,showframe}
\begin{document}
\AddToShipoutPictureBG*{%
  \AtPageUpperLeft{\raisebox{-\baselineskip}{\makebox[\paperwidth]{This is at the top, centred}}}%
  \AtPageCenter{\rotatebox{52}{\makebox[0pt]{\Huge This is diagonally across the page}}}}
Some text
\end{document}
6

Using background package is also an option where scale, angle, position, color, (x, y) shift can be controlled by users.

\documentclass[12pt]{book}
\usepackage[showframe,margin=1in]{geometry}
\usepackage{background}

\begin{document}
This is a text.
\SetBgContents{This watermark is at the top}      % a watermark
\SetBgPosition{current page.center}
\SetBgAngle{0}                                    % rotate
\SetBgColor{blue}                                 % color
\SetBgScale{1.5}                                  % scale
\SetBgHshift{0}                                   % location x=0 for center
\SetBgVshift{9cm} 

\makeatletter                % For a second watermark on the same page then repeat
\AddEverypageHook{%          % Or AddThispageHook for one time only                     
\SetBgContents{This watermark is diagonally laid} % a watermark
\SetBgPosition{current page.center}
\SetBgAngle{45}                                   % rotate
\SetBgColor{red}                                  % color
\SetBgScale{1.5}                                  % scale
\SetBgHshift{0}                                   % location x=0 for center
\SetBgVshift{0}
\bg@material}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.