I'm having problem with two separate things.
- The first is, that I can't put a watermark over the images. As you can see in the comments, I have tried many different ways, but none of them works correctly or do what I want. And I can't understand why (this is my first document in LaTeX).
- The second thing I need to do, is to change a certain page in my document, from Portrait to Landscape. But the thing is, that I want the whole page to change into Landscape. Meaning the Header and Footer too, and thus I don't want to rotate the page. I have also tried different ways but none of them works as wanted.
I have simplified my code so you can only see one page and not the whole document. Can anyone please help me?
\documentclass[10]{article}
\usepackage{graphicx} %Pictures
\usepackage{fancyhdr} %Header-Footer
\usepackage{pdflscape} %Landscape
\usepackage{lscape} %Landscape
\usepackage[top=2.5cm, bottom=3cm, left=2cm, right=2cm]{geometry} %Page Margins
\usepackage{draftwatermark} %Works but does not set watermarks over image
%\usepackage[printwatermark]{xwatermark} %Doesn't work
\usepackage{xcolor} %Color Manipulation
%\newsavebox\mybox %Doesn't work
%\savebox\mybox{\tikz[color=red,opacity=0.3]\node{DRAFT};} %Doesn't work
%\newwatermark*[ allpages, angle=45, scale=6, xpos=-20, ypos=15]{\usebox\mybox}
%https://tex.stackexchange.com/questions/132582/transparent-foreground-watermark
%\SetWatermarkText{\includegraphics{draft.png}} %Doesn't work
%https://tex.stackexchange.com/questions/61137/watermark-image
\graphicspath{{C:\Path...}} %path for pictures
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[R]{}
\newpage
\pagestyle{fancy}
\fancyhf{}
\fancyhead[R]{Header \\ Date}
\fancyfoot[C]{\textbf{Footer}}
\fancyfoot[R] {\textbf{•}\\ \thepage} % \textbf{•} is empty, therefore No. of page is in 2nd line
\begin{document}
%\newwatermark*[page=2-\lastdocpage,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{\textsc{draft}} %Doesn't work
%https://tex.stackexchange.com/questions/118939/add-watermark-that-overlays-the-images
\SetWatermarkText{\textsc{draft}} %Works but does not set watermarks over image as wanted
\SetWatermarkScale{3} %Works but does not set watermarks over image as wanted
\SetWatermarkColor[gray]{0.75} %Works but does not set watermarks over image as wanted
\begin{landscape}
\begin{figure}[h!]
\begin{center}
\fbox{\includegraphics[scale=0.80]{11.png}}
\caption{Caption rotates with image as wanted}
\end{center}
\end{figure}
\end{landscape}
\end{document}
Best Answer
Here is a suggestion using a combination of package
typearea
from the KOMA-Script bundle and packagegeometry
. Note that you can not use\newgeometry
to change the margins of the resulting landscape page. Its bottom margin will be about twice as large as its top margin.To get the correct head and foot width on the landscape page I would use
scrlayer-scrpage
insteadfancyhdr
for header and footer.Then an additional foreground layer can be defined and added to all layer page styles (
@everystyle@
) or to a selected one (eg.scrheadings
). I presume that the text below the watermark should be still readable, so I use atikz
node withopacity=.3
.Result: