# Image at bottom right Corner of the type area

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}%
}}



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) …

-
-1 for without TikZ ;-) Joking. –  Harish Kumar Nov 27 '13 at 13:31
Haha :D Is it possible with TikZ? –  Ronny Nov 27 '13 at 13:33
I prefer a more „native“ solution, but will accept TikZ if no native solution exists (which I don’t believe). –  Ronny Nov 27 '13 at 13:37
I was joking again. There is a tikz solution that may get updated within an hour. :-) –  Harish Kumar Nov 27 '13 at 13:44

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

-
RTFM :D Thank you! It does the job perfectly! –  Ronny Nov 27 '13 at 14:29

A tikz solution any way.

\documentclass{article}
\usepackage[a4paper,margin=1in,showframe]{geometry}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc}
\usepackage{graphicx,lipsum}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\begin{pgfonlayer}{background}
\node[anchor=south east,outer sep=0pt,inner sep=0pt] at ($(current page.south east) +(-1in,1in)$) {\includegraphics[width=2cm]{example-image-a}};
\end{pgfonlayer}
\end{tikzpicture}
\lipsum[1-15]
\end{document}


Notes:

I have added the picture in the background and picture is added only for one page. If you want the picture for all / some pages, use background package. If you change the margin, use appropriate values in ($(current page.south east) +(-1in,1in)$). (-1in,1in) is actually (<-right margin>,<bottom margin>).

-
Thanks for the suggestion, but it does not fully answer my question. First, I can put coordinates at \put(x,y) too, so no TikZ is necessary, right? Second, my type area is automatically calculated with KOMA Script. So I have to obtain the coordinates and do not set constants. –  Ronny Nov 27 '13 at 14:05
I think we have to use something like \evensidemargin, \oddsidemargin, \textheight and \textwidth –  Ronny Nov 27 '13 at 14:09