Summary:
Using \pgfpagesuselayout a second time does not always completely override the settings from the first time it is used.
MWE:
(Borrowed from user Briffou, from https://github.com/alex-ball/beamerswitch/issues/8)
Document 1
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{2 on 1}[letterpaper]
\usetheme{metropolis}
\begin{document}
\begin{frame}{First}
This is a text in first frame.
\end{frame}
\begin{frame}{Second}
This is a text in second frame.
\end{frame}
\end{document}
Document 2
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{16 on 1}[letterpaper]
\pgfpagesuselayout{2 on 1}[letterpaper]
\usetheme{metropolis}
\begin{document}
\begin{frame}{First}
This is a text in first frame.
\end{frame}
\begin{frame}{Second}
This is a text in second frame.
\end{frame}
\end{document}
Expected behaviour:
The manual says that if the function is called multiple times, only the last call wins, so these two examples should produce identical output.
Actual outcome:
Document 1 shows two slides almost filling the page. In Document 2 the slides are tiny: the positions are correct for the 2 on 1 layout, but the size/scaling is from the 16 on 1 layout. The bug is not apparent if the smaller scale layout is the later one; that is, if 16 on 1 is specified after 2 on 1, the slides shrink correctly.
Platform:
TeX Live 2018, PGF 3.0.1a.
I have an extension of pgfpages (imaginatively called pgfmorepages) which solves this issue, as well as extending the capabilities somewhat.
The code is available at https://github.com/loopspace/pgfmorepages I'd be happy to contribute all or part of it to the PGF code base.