[Tex/LaTex] Image at bottom right Corner of the type area

backgroundsgraphicspositioning

With the following code I put an image in the bottom left corner of a page (see How to place an image in bottom left hand corner on every page? too).

\newcommand{\BackgroundPic}
{%
\put(0,0){%
\includegraphics[width=1cm,height=1cm,%
keepaspectratio]{images/test.png}%
}}

\AddToShipoutPicture*{\BackgroundPic}

But I want to put the image to the bottom right corner of the type area. How can I do this? I need the coordinates of the bottom right corner of the type area (without TikZ) …

Best Answer

\documentclass{article}
\usepackage[a4paper,margin=1in,showframe,marginparsep=0pt,marginparwidth=0pt]{geometry}
\usepackage{graphicx}
\usepackage{eso-pic}
\AddToShipoutPictureBG*{%
  \AtTextLowerLeft{\makebox[\textwidth][r]{%
    \includegraphics[width=1cm,height=1cm,keepaspectratio]{example-image-a}}}}
\begin{document}
 Some text here
\end{document}

enter image description here