The command \ifportrait
detects the value of orientation
. So you can replace your line
\parbox{\textwidth}{\includegraphics[width=\paperwidth]{poster-banner}}
with a test and appropriate code for each case
\ifportrait
\parbox{\textwidth}{\includegraphics[width=\textwidth]{poster-banner}}
\else
\parbox{\textwidth}{\includegraphics[width=\textwidth,height=10cm]{poster-banner}}
\fi
The format is \ifportrait <portait-case> \else <landscape-case> \fi
. I have made a random choice of a height of 10cm in the landscape
case, you will need to write something appropriate four your particular case. For example, you might find a minipage
more suitable than a \parbox
and could write
\begin{minipage}{\textwidth}
\centering\includegraphics[width=0.5\textwidth]{poster-banner}
\end{minipage}
in the landscape case.
To use this as a style, put the following in the file beamerthemeProva.sty
\mode<presentation>
\setbeamertemplate{headline}{
\leavevmode
\ifportrait
\parbox{\textwidth}{\includegraphics[width=\textwidth]{example-image-a}}
\else
\begin{minipage}{\textwidth}\centering\includegraphics[width=0.5\textwidth,height=15cm]{example-image-a}\end{minipage}
\fi
\vskip-35ex
\begin{beamercolorbox}[wd=\paperwidth]{headline}
\begin{columns}[T]
\begin{column}{.2\paperwidth}
\begin{center}
\ifdefined\LeftLogo
\includegraphics[width=.6\linewidth,keepaspectratio,clip]{\LeftLogo}
\else
\fi
\end{center}
\vskip1.5cm
\end{column}
\begin{column}{.65\paperwidth}
\hskip1ex
\vskip4ex
\raggedright
\usebeamercolor{title in headline}{\color{fg}\textbf{\LARGE{\inserttitle}}\\[1ex]}
\usebeamercolor{author in headline}{\color{fg}\Large{\insertauthor}\\[0.5ex]}
\usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
\end{column}
\begin{column}{.15\paperwidth}
\begin{center}
\ifdefined\RightLogo
\includegraphics[width=.6\linewidth,keepaspectratio,clip]{\RightLogo}
\else
\fi
\end{center}
\vskip1.5cm
\end{column}
\end{columns}
\end{beamercolorbox}}
\mode<all>
and then you can have a main document (a variation on the standard example in the beamerposter distribution) such as the following
\def\RightLogo{example-image-a.pdf}
\def\LeftLogo{example-image-b.pdf}
\documentclass[final]{beamer}
\mode<presentation> { \usetheme{Berlin}
\usepackage{times}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\boldmath
\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[orientation=landscape,size=a0,scale=1.4,debug]{beamerposter}
\usetheme{Prova} }
\graphicspath{{figures/}}
\title[Fancy Posters]{Making Really Fancy Posters with \LaTeX}
\author[Dreuw \& Deselaers]{Philippe Dreuw and Thomas Deselaers}
\institute[RWTH Aachen University]{Human Language Technology and Pattern Recognition, RWTH Aachen University}
\date{Jul. 31th, 2007}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\begin{document}
\begin{frame}{}
\vfill
\begin{block}{\large Fontsizes}
\centering
{\tiny tiny}\par
{\scriptsize scriptsize}\par
{\footnotesize footnotesize}\par
{\normalsize normalsize}\par
{\large large}\par
{\Large Large}\par
{\LARGE LARGE}\par
{\veryHuge VeryHuge}\par
{\VeryHuge VeryHuge}\par
{\VERYHuge VERYHuge}\par
\end{block}
\vfill
\vfill
\begin{block}{\large Fontsizes}
\centering
{\tiny tiny}\par
{\scriptsize scriptsize}\par
{\footnotesize footnotesize}\par
{\normalsize normalsize}\par
{\large large}\par
{\Large Large}\par
{\LARGE LARGE}\par
{\veryHuge VeryHuge}\par
{\VeryHuge VeryHuge}\par
{\VERYHuge VERYHuge}\par
\end{block}
\vfill
\begin{columns}[t]
\begin{column}{.48\linewidth}
\begin{block}{Introduction}
\begin{itemize}
\item some items
\item some items
\item some items
\item some items
\end{itemize}
\end{block}
\end{column}
\begin{column}{.48\linewidth}
\begin{block}{Introduction}
\begin{itemize}
\item some items and $\alpha=\gamma, \sum_{i}$
\item some items
\item some items
\item some items
\end{itemize}
$$\alpha=\gamma, \sum_{i}$$
\end{block}
\begin{block}{Introduction}
\begin{itemize}
\item some items
\item some items
\item some items
\item some items
\end{itemize}
\end{block}
\begin{block}{Introduction}
\begin{itemize}
\item some items and $\alpha=\gamma, \sum_{i}$
\item some items
\item some items
\item some items
\end{itemize}
$$\alpha=\gamma, \sum_{i}$$
\end{block}
\end{column}
\end{columns}
\end{frame}
\end{document}
You can now change the orinetation from landscape
to portrait
and get different effects.