You could do this by some sneaky border code
stuff which threw away the given path (which is a box around each subpage) and drew just the bottom line for the relevant pages but I don't think that would look all that great since the lines wouldn't join up and wouldn't be vertically centred (as the pages are slightly shrunken).
So here's an alternative which defines a "background" page which is put behind all the others and which takes up the whole page. On this we draw three horizontal lines. This is never written to by the pgfpages
page collection mechanism and is copied from (physical) page to (physical) page. The only downside is that if you have a total of 17 slides then the second physical page (which has only one logical page) still has all three lines drawn on it.
Here's the code:
\documentclass[xcolor=dvipsnames, handout]{beamer}
\usepackage{pgfpages}
\usepackage{pgffor}
\beamertemplatenavigationsymbolsempty
\pgfpagesdeclarelayout{16 on 1 with background}
{
\edef\pgfpageoptionheight{\the\paperheight}
\edef\pgfpageoptionwidth{\the\paperwidth}
\edef\pgfpageoptionborder{0pt}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=17,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
first logical shipout=2,%
}
\pgfpageslogicalpageoptions{1}
{%
resized width=\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight},%
border code={%
\pgfusepath{discard}%
\pgfpathmoveto{\pgfpoint{0pt}{.25\ht0}}%
\pgfpathlineto{\pgfpoint{\wd0}{.25\ht0}}%
\pgfpathmoveto{\pgfpoint{0pt}{.5\ht0}}%
\pgfpathlineto{\pgfpoint{\wd0}{.5\ht0}}%
\pgfpathmoveto{\pgfpoint{0pt}{.75\ht0}}%
\pgfpathlineto{\pgfpoint{\wd0}{.75\ht0}}%
\pgfusepath{stroke}%
},%
copy from=1,%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.125\pgfphysicalwidth}{.875\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.375\pgfphysicalwidth}{.875\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.625\pgfphysicalwidth}{.875\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{5}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.875\pgfphysicalwidth}{.875\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{6}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.125\pgfphysicalwidth}{.625\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{7}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.375\pgfphysicalwidth}{.625\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{8}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.625\pgfphysicalwidth}{.625\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{9}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.875\pgfphysicalwidth}{.625\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{10}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.125\pgfphysicalwidth}{.375\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{11}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.375\pgfphysicalwidth}{.375\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{12}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.625\pgfphysicalwidth}{.375\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{13}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.875\pgfphysicalwidth}{.375\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{14}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.125\pgfphysicalwidth}{.125\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{15}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.375\pgfphysicalwidth}{.125\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{16}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.625\pgfphysicalwidth}{.125\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{17}
{%
border shrink=\pgfpageoptionborder,%
resized width=.25\pgfphysicalwidth,%
resized height=.25\pgfphysicalheight,%
center=\pgfpoint{.875\pgfphysicalwidth}{.125\pgfphysicalheight}%
}%
}
\pgfpagesuselayout{16 on 1 with background}[a0paper,border shrink=5mm, landscape]
\begin{document}
\begin{frame}[plain]
\titlepage
\end{frame}
\foreach \k in {1,...,31} {
\begin{frame}{Frame \k}
This is frame \k
\end{frame}
}
\end{document}
Result:
Best Answer
You can use
\leaders\hrule\hfill
to essentially perform an\hrule
in horizontal mode.I removed the background image from your example code and added a
\maintitle
macro that performs the formatting you want. I also added a small space on either side. I thought that looked better.