# Text on background-image footer and header

I'm trying to create a template for my article, which has an image on the header, and on on the footer. I also want to put text on these images. The result would look like this :

(Blue and green zone are images)

I need :

• Image in their backgrounds
• Text written on these, positioned where i want

I already have my header and my footer full width (with the fancyhdr package), but i'm struggling to write on it.

I already have this for the header (works but i don't know how to position the text) :

\usepackage{fancyhdr}
\begin{titlepage}
\begin{center}
\begin{textblock*}{3cm}(0mm,-3mm)
\end{textblock*}
\end{center}
\end{titlepage}
}

\pagestyle{fancy}
\fancyhf{}


And for the footer :

\lfoot{
\makebox[\textwidth]{\includegraphics[width=\paperwidth]{footer}
}
}


\makebox was the only thing i found to have a full-width footer, i've used several packages without really knowing how they work, so now i'm a bit lost.

• positioned where i want... Please specify where you want them... – user11232 Nov 3 '15 at 13:05
• A titlepage environment in a header? What should this do? – Ulrike Fischer Nov 3 '15 at 14:25
• Is that stuff supposed to be on every page or just the title page? – Johannes_B Nov 4 '15 at 14:12
• Harish Kumar --> as described on the image, but it's better if there are more possibilities – cadoman Nov 4 '15 at 15:54
• Ulrike Fischer --> only thing i found to have a pagewitdh image header – cadoman Nov 4 '15 at 15:55

If you know how to use tikz:

\documentclass{article}
\usepackage{everypage}
\usepackage{tikzpagenodes}
\usetikzlibrary{calc}
\usepackage{mwe}

\pagestyle{empty}

\fill[blue] (current page.north west) rectangle (current page text area.north -| current page.east);
\node[fill=white] at (current page header area) {Insert pretty much anything anywhere};
\fill[blue] (current page.south west) rectangle (current page footer area.north -| current page.east);
\end{tikzpicture}}

\begin{document}
\lipsum[1-8]
\end{document}


Here is another suggestion using package scrlayer-scrpage. There you can define and use a new page style by different new layers.

Example:

Code:

\documentclass{article}
\usepackage{blindtext}
\usepackage[vmargin=3cm]{geometry}
%\usepackage{graphicx}
\usepackage{xcolor}

\newcommand\barrule{\rule[-\dp\strutbox]{1pt}{\dimexpr\ht\strutbox+\dp\strutbox\relax}}

\usepackage[automark,autooneside=false]{scrlayer-scrpage}

\renewcommand\pagemark{\usekomafont{pagenumber}Page~\thepage}
\renewcommand\sectionmarkformat{}% no section number in the header
\renewcommand\subsectionmarkformat{}% no subsection number in the header

\DeclareNewPageStyleByLayers[oninit={%
\setkomafont{pagenumber}{}%

\DeclareNewLayer[
background,
mode=picture,
width=\paperwidth,
contents={%
\putLL{\put(0,0){%
%\includegraphics[width=\layerwidth,height=\layerheight]{example-image-A.pdf}%
\textcolor{blue!50!black}{\rule{\layerwidth}{\layerheight}}%

\DeclareNewLayer[
background,
\parbox[b][\layerheight][b]{\layerwidth}{\raggedleft%
title \barrule{} \leftmark%
\ifstr{\rightmark}{\leftmark}{}{ \barrule{} \rightmark}%
\DeclareNewLayer[
background,
mode=picture,
align=b,
voffset=\paperheight,
width=\paperwidth,
contents={%
\putLL{\put(0,0){%
%\includegraphics[width=\layerwidth,height=\layerheight]{example-image-B.pdf}%
\textcolor{green!50!blue!60!black}{\rule{\layerwidth}{\layerheight}}%
}}}]{foot.image}
\DeclareNewLayer[
foreground,
foot,
\parbox[t]{\layerwidth}{%
\begin{tabular}[t]{l}
Title\\
[2ex]My name
\end{tabular}%
\hfill%
\begin{tabular}[t]{r}
\pagemark\\[2ex]
My cursus \barrule{} date%
\end{tabular}%
}}]{foot.text}

\begin{document}
\pagestyle{backgroundimages}
\section{A section}
\Blindtext[7]
\subsection{A subsection}
\Blindtext[10]
\Blinddocument
\end{document}