Using the draftwatermark
package, you can use a \parbox
, or a minipage
, to have the text spanning several lines:
\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage{draftwatermark}
\usepackage{url}
\usepackage{lipsum}
\SetWatermarkText{\parbox{12cm}{%
Mika Ike \\
\url{mikaike@mikaike.mikaike} \\
At My house}}
\SetWatermarkScale{.5}
\SetWatermarkColor{red}
\begin{document}
\lipsum[4]\lipsum[4]
\lipsum[4]\lipsum[4]
\end{document}
In the case of opacity for images, the draftwatermark
package apparently doesn't provide many possibilities.
As an alternative, I'd suggest you to use the background
package; since this package internally uses TikZ, you can easily control the attributes (opacity, color, position, etc.) for the background material. A little example:
\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage[scale=2.5,opacity=1,color=red]{background}
\usepackage{url}
\usepackage{varwidth}
\usepackage{lipsum}
\backgroundsetup{
contents={\begin{varwidth}{8cm}{%
Mika Ike \\
\url{mikaike@mikaike.mikaike} \\
At My house}\end{varwidth}}
}
\begin{document}
\lipsum[4]\lipsum[4]
\lipsum[4]\lipsum[4]
\end{document}
The varwidth
environment was used to have a box of adjustable width allowing multiple lines of text; a minipage
or a \parbox
could also have been used instead.
And, using an image:
\documentclass{article}
\usepackage[a6paper]{geometry}
\usepackage[scale=1,opacity=0.75,angle=0]{background}
\usepackage{url}
\usepackage{varwidth}
\usepackage{lipsum}
\backgroundsetup{
contents={\includegraphics[height=\textheight,width=\textwidth,keepaspectratio]{ctanlion}}
}
\begin{document}
\lipsum[4]\lipsum[4]
\lipsum[4]\lipsum[4]
\end{document}
CTAN lion drawing by Duane Bibby.
Using Gonzalo's code with tikz
\documentclass{article}
\usepackage[printwatermark]{xwatermark}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{lipsum}
\newsavebox{\waterbox}
\begin{lrbox}{\waterbox}
\begin{tikzpicture}[remember picture]
\fill[draw,white,opacity=0.7] ([shift={(2,2)}]current page.south west) rectangle (current page.north east);
\node[text width = 2in,rotate=-45] at ([shift={(10mm,10mm)}]current page.center) {Some text here that appeas dark and rest is blurred};
\end{tikzpicture}
\end{lrbox}
\newwatermark*[allpages,angle=45,scale=3,xpos=0,ypos=0]{\usebox{\waterbox}}
\begin{document}
\lipsum[1-2]
\begin{figure}[!ht]
\centering
\includegraphics[width=3cm]{example-image-a}
\end{figure}
\lipsum[1-2]
\lipsum[1-20]
\end{document}
You have to adjust the position of text in
\node[text width = 2in,rotate=-45] at ([shift={(10mm,10mm)}]current page.center) {Some text here that appeas dark and rest is blurred};
Now with eso-pic
.
\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}
\newsavebox{\waterbox}
\begin{lrbox}{\waterbox}
\begin{tikzpicture}[remember picture]
\fill[draw,white,opacity=0.7] ([shift={(2,2)}]current page.south west) rectangle (current page.north east);
\node[rotate=45,text width = 0.5\textwidth,scale=2,anchor=center,align=center] at ([shift={(0.6\paperwidth,1cm)}]current page.west) {Some text here that appeas dark and rest is blurred};
\end{tikzpicture}
\end{lrbox}
\usepackage{eso-pic}
\AddToShipoutPictureFG{%
\usebox{\waterbox}
}
\begin{document}
\lipsum[1-2]
\begin{figure}[!ht]
\centering
\includegraphics[width=3cm]{example-image-a}
\end{figure}
\lipsum[1-2]
\lipsum[1-20]
\end{document}
Best Answer
How about a simple example like the following? Create the image file, name it
test.png
, then compile the document viapdflatex
.There is also the eso-pic package, but I have not used it myself.