3

Some folks keep sending Word documents to me including ugly watermarks and expect me to use them as well.

Can I include a »watermark« into a document, which rotates in the background, at least, if viewed with Acrobat Reader XI ?

\documentclass{scrartcl}
\usepackage{draftwatermark, graphicx}
\SetWatermarkText{\includegraphics[angle=-45]{image}}

\begin{document}
bla

\end{document}

If you need JavaScript, no problem, if I can embedd it into the PDF... What I'd like to do is making the "image" rotate if the PDF is opened, maybe a frame every 2 seconds.

Not possible, probably!?

Keks Dose
  • 30,892

1 Answers1

2

You can use the animate package, but to get the graphic in the background you need the "ocg" method:

\documentclass{scrartcl}
\usepackage{graphicx}

\usepackage[method=ocg]{animate}
\usepackage{eso-pic,background,color}

\DeclareRobustCommand\animatedbackground{%
 \begin{animateinline}[autoplay,loop]{3}
  \includegraphics[width=5cm,angle=45]{example-image}
  \newframe
  \includegraphics[width=5cm,angle=90]{example-image}
  \newframe
  \includegraphics[width=5cm,angle=135]{example-image}
 \end{animateinline}}  

%works too 
%\AddToShipoutPictureBG
%{\AtPageCenter{\animatedbackground}}

\backgroundsetup{contents=\animatedbackground,scale=1}
\usepackage{blindtext}
\begin{document}

\blindtext[10]

\end{document}

I leave it to you to build a sensible loop content.

Ulrike Fischer
  • 327,261
  • IT WORKS! Incredible, a rotating background image. So we can have a clock, e.g., with moving hands! Thank you! Well, I'm really satisified, but maybe I find out how to make angle=X a variable from 0° to 360°. – Keks Dose Nov 02 '15 at 17:21