In the following code, the logo is centered in the framebox. How can I get it aligned to the right?
keepaspectratio, right does not work...contrary to what I found on the net.
Error: "Package xkeyval Error: 'right' undefined in families 'Gin'. \newpage"
\documentclass[11pt,a4paper]{article}
\usepackage{wallpaper}
\usepackage[left=1.3cm,right=4.6cm,top=1.8cm,bottom=4.0cm,marginparwidth=3.4cm]{geometry}
\usepackage{adjustbox}
\usepackage{xcolor}
\usepackage{pdflscape}
\usepackage[useregional]{datetime2}
\usepackage{fancyhdr}
\setlength{\headheight}{80pt}
\pagestyle{fancy}\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\setlength{\parindent}{0cm}
\newcommand\BackgroundStructure{
\setlength{\unitlength}{1mm}
\setlength\fboxsep{0mm}
\setlength\fboxrule{0.5mm}
\put(10, 10){\fcolorbox{red}{red!10}{\framebox(155,247){}}} % mainr
\put(165, 10){\fcolorbox{blue}{blue!10}{\framebox(37,247){}}} % margin
\put(10, 262){\fcolorbox{green}{green!10}{\framebox(192, 25){{\includegraphics[height=23mm,keepaspectratio]{C:/ProgramData/.../.../logo.jpg}}}}} % header
}
\fancyhead[L]{\begin{tabular}{l r | l r}
\textbf{Project} & new project & \textbf{Pag.} & \thepage/\pageref{LastPage} \
\textbf{Nr.} & 2020-000A & \textbf{Date} & $\today$ \
\textbf{Program version} & 1.5 & & \
\textbf{Calculated by} & John & \textbf{Company} & \textbf{Doe Chemical}\
\end{tabular}}
%\graphicspath{ logo folder }
\begin{document}
\AddToShipoutPicture{\BackgroundStructure}
\section{Results}
\begin{tabular}{lcl}
\hline
\multicolumn{3}{l}{Limit:}\
vertical: & 2.7 $ \leq$ 18.8 & OK\
Horizontal: & 52.5 $\leq$ 398 & OK\
for class: & 1 & OK\
for class: & 1 & OK\
\multicolumn{3}{l}{State:}\
Geometric stability: & & OK\
\end{tabular}
\newpage
\end{document}

\hfilldirectly before the\includegraphicscommand and the image should be right aligned inside of the green box. – leandriis Sep 20 '20 at 10:03rightto the optional argument of\includegraphics. Where exactly did you find this information? – leandriis Sep 20 '20 at 10:05rightoption for example here: https://tex.stackexchange.com/a/91580/134144. Please be aware, that theadjustboxpackage in this question is loaded with theexportoption, an option you did not include. You need this option in order to be able to use key originally defined for\adjustboxwith\includegraphicsas well. Thus, using\usepackage[export]{adjustbox}should help getting rid of the error message. – leandriis Sep 20 '20 at 10:10\hfillcommand. My remarks aboutadjustboxwere ment to explain why you got the error message in the first place. – leandriis Sep 20 '20 at 12:32