I need to add two pictures, one at the top and one at the bottom of every page of my article (to format it for a congress). I've find a way that worked for the top picture there is shown below:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[top=160pt]{geometry}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{float}
\usepackage{everypage}
\def\PageTopMargin{1cm}
\def\PageLeftMargin{0in}
\newcommand\atxy[3]{%
\AddEverypageHook{\smash{\hspace*{\dimexpr-\PageLeftMargin-\hoffset+#1\relax}%
\raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{#3}}}}
\atxy{0in}{0in}{\raisebox{-\height}{\includegraphics[width=15cm]{imagens/Cabeçalho.jpg}}}
\title{Test}
\author{MasterChief}
\begin{document}
\maketitle
\lipsum[1-7]
\begin{figure}[H]
\centering
\includegraphics[]{example-image-b}
\end{figure}
\lipsum[2-10]
\end{document}
The output is:
I adapted the code from this question of the forum: How to put an image at the top/bottom border of every page?, and it worked fine for the top picture, although I don't know how to add the bottom picture just based on it.
So I wanted to know how to add the bottom picture based on this, or if there's an easier way to do it. (Using other packages or something similar)
**Edit:**I also need to include the page number on the right upper corner of the bottom picture. The configurations that worked for me (maintaining the formating that I need and without overwriting the text below) were:
\usepackage[left=2.0cm,right=2.0cm,bottom=2.0cm,bmargin=3.90cm,tmargin=4.1cm,headheight=3.25cm,
headsep=1\baselineskip]{geometry}
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\fancyhead[C]{\includegraphics[width=\linewidth, height=3cm]{imagens/Cabeçalho.jpg}}%
\fancyfoot[C]{\includegraphics[width=\linewidth, height=3.25cm]{imagens/Rodapé.jpg}}
}
\footskip=97pt
\pagestyle{plain}
\fancyfoot[R]{\thepage}
The output that I'm getting is:
and the result that I need is:
So in sum, all the page number are located on the right corner and I just need to deslocate the number of the page to a position similar to that without modfiyng the margins of the pictures.





