I am using TexLive and I have a problem with setting up a background image. My code looks like following:
\documentclass[10pt]{article}
\usepackage[a4paper]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{ngerman}
\usepackage[]{background}
\usepackage[default]{opensans}
\backgroundsetup{
scale=1,
color=black,
opacity=0.9,
angle=0,
placement=bottom,
nodeanchor=south,
vshift=2cm,
contents={%
\includegraphics[width=\textwidth, height=4in]{background-image.png}
}%
}
\begin{document}
Test
\end{document}
When I compile the .tex file via pdflatex test.tex the image's position is on top of the paper and only a small part of it is visible. After recompiling the PDF: the image's position is at the bottom of the page with some bottom margin, so it is correct.
I don't know why I have to compile the same file twice to get the correct result. Does anyone have an idea what I am doing wrong?
Thanks for help!
\usepackage[ngerman]{babel}instead. – Ulrike Fischer Apr 27 '21 at 21:55