# Footline placement after \begin{document}

I'm trying to place an image as a border in the footer (footline) of a beamer presentation. I've noticed that if I use \setbeamertemplate{footline}[large] after the \begin{document}, the vertical placement is too low to show the image. If I use it before \begin{document}, then it gets placed correctly. In the final presentation, some slides (such as the title slide) will have this, but more will not, which is why I don't want to set it globally above \begin{document} and then suppress it on the slides which don't have it.

What I'm trying to do would look like:

\defbeamertheme{footline}{large}{
\leavevmode
\includegraphics[width=\paperwidth]{images/banner.pdf}
\begin{tikzpicture}[overlay]
\node at (-.845\paperwidth,.05\paperheight) {
\includegraphics[width=.15\paperwidth]{images/logo.png}
};
\end{tikzpicture}
}

\begin{document}
{\setbeamertemplate{footline}[large]
\begin{frame}
\titlepage
\end{frame}
}
\begin{frame}{Frame without footline}
Text
\end{frame}
\end{document}


You can solve it by recalculating head and foot dimension by \beamer@calculateheadfoot.

\documentclass[demo]{beamer}
\usepackage{tikz}
\title{Here is the Title}
\author{Author}
\date{\today}
\defbeamertemplate{footline}{large}{
\leavevmode
\includegraphics[width=\paperwidth]{images/banner.pdf}
\begin{tikzpicture}[overlay]
\node at (-.845\paperwidth,.05\paperheight) {
\includegraphics[width=.15\paperwidth]{images/logo.png}
};
\end{tikzpicture}
}
\newcommand*{\enablefoot}{%
\setbeamertemplate{footline}[large]
\resetsize
}
\newcommand*{\disablefoot}{%
\setbeamertemplate{footline}{}
\resetsize
}
\begin{document}
\enablefoot
\begin{frame}
\titlepage
\end{frame}
\disablefoot
\begin{frame}{Frame without footline}
Text
\end{frame}
\end{document}


Remarks:

• I used \csname beamer@calculateheadfoot\endcsname because this definition would cause an error:

\newcommand*{\resetsize}{%
\makeatletter