I want to apply a background image to a document, but it seems to fail to cover the bottom and the right side of the pictures.
I started using the eso-pic example from here.
Simplifying my document I find that
\documentclass[a4paper,10pt]{article}
\usepackage{fullpage}
\usepackage{eso-pic,graphicx}
\usepackage{hyperref}
\addtolength{\textwidth}{2cm}
\addtolength{\hoffset}{-1cm}
\addtolength{\textheight}{3cm}
\addtolength{\voffset}{-1.5cm}
\begin{document}
\AddToShipoutPictureBG*{
\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}
};
\pagestyle{empty} % non-numbered pages
\end{document}
creates an image like below :
Where the white regions are the part of the page which are not covered by the image. How might I ensure the background image covers the entire page?
Strangely I fine that I can get rid of the bottom margin by removing the "\usepackage{hyperref}." This seems related to this question : Why does the hyperref package change the paper size?
However even without the hyperref package the right margin remains uncovered.
Cheers and thanks, Charles.
geometry
package (instead of\addtolength{\textwidth}{2cm}
and so on), use\AddToShipoutPictureBG*{\AtPageLowerLeft{\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}}}
and replace the;
e.g. by~
it works.\documentclass[a4paper,10pt]{article} \usepackage{eso-pic,graphicx} \usepackage{hyperref} \usepackage[top=2cm, bottom=2cm, outer=0cm, inner=0cm]{geometry} \pagestyle{empty} \begin{document} \AddToShipoutPictureBG*{\AtPageLowerLeft{\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}}} ~ \end{document}