According to the documentation, the following should produce watermarks on every page, but it only appears on the first page:
\newwatermark*[allpages,angle=45]{watermark}
It seems xwatermark treated the doc as a single page documentation, oddpages produced the same effect as allpages and evenpages the watermark will never show up. I used \newpage in my doc and disabled page number.
And if I move text mark to background, it also doesn't appear at all:
\newwatermark[allpages,angle=45]{watermark}
However draftwatermark successfully printed watermark on all pages. But I need some features in xwatermark so need to make it work.
Edit: It's a rather large file, base configurations for this tex file as following. I think it should included all samples that might concern the question.
\documentclass[10pt]{article}
% encoding
\usepackage[T1]{fontenc}
% watermark
\usepackage{xwatermark}
\usepackage{textcomp}
\usepackage{afterpage}
% line spacing
\usepackage{setspace}
% use color in latex
\usepackage{xcolor}
% character encoding
\usepackage[utf8]{inputenc}
\usepackage{CJKutf8}
% adjust the page margins
\usepackage[scale=0.75,a4paper,bindingoffset=0.2in,left=0.5in,right=1in,top=1in,bottom=1in,footskip=.25in]{geometry}
% define page header and footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{\iffloatpage{0pt}{0pt}}
\renewcommand{\footrulewidth}{\iffloatpage{0pt}{0pt}}
% define page style
\fancypagestyle{summary}{
\fancyhf{} % Clear all headers/footers
\renewcommand{\headrulewidth}{4mm}
\fancyhead[L]{% header left-aligned
\fontsize{12}{14} \selectfont
\textcolor{grey}{}\vspace{1em}
}
\renewcommand{\headrule}{\hbox to\headwidth{%
\color{green}\leaders\hrule height \headrulewidth\hfill}}
\renewcommand{\footrulewidth}{0pt}% No footer rule
}
% set watermark
\newwatermark*[allpages,angle=45]{watermark}
\begin{document}
\begin{CJK*}{UTF8}{gbsn}
page 1 ...
\newpage
page 2 ...
\newpage
\clearpage\end{CJK*}
\end{document}
Edit: @steve in comments compiled a file with watermarks on both pages, but I didn't. The sencond page has no watermark. I'm working on Ubuntu.
I found a historical problem some years ago here: xwatermark allpages does not work on Ubuntu but comments saying it shouldn't matter with operating system. While it demonstrated to be.
xwatermark.sty 2012/10/23 v1.5.2d). If you really aren't getting a watermark on both pages, add the line\listfilesto your preamble, compile, check the end of the.logfile and post the file versions of the relevant packages. – jon Oct 14 '16 at 19:19xwatermarkis the same version as yours. But after I did an upgrade from apt source, it's fixed. I didn't notice which one was upgraded (not tex live nor xwatermark), apt upgrade log showed no package related to tex live changed. – knh190 Oct 15 '16 at 09:33xwatermark. However, other packages have changed since TL2015 (some are loaded behind the scenes). There also can be (resolvable) conflicts betweenxwatermarkandgeometry: if interested, see §.9 of thexwatermarkpackage for more details. – jon Oct 15 '16 at 16:09