I'd like to print handout slides with `handoutWithNotes` package associated with `beamer`, but a simple try
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\usepackage{handoutWithNotes}
\pgfpagesuselayout{2 on 1 with notes}[a4paper,border shrink=5mm]
\begin{document}
\begin{frame}
My first slide
\end{frame}
\begin{frame}
Second one
\end{frame}
\begin{frame}
Third
\end{frame}
\end{document}
returned me always the error message such as
! Undefined control sequence.
\@begindocumenthook ...ox { \vskip .05\pageheight
Notes\vskip .1\pageheight ...
l.8 \begin{document}
Apparently it comes with `\pgfpagesuselayout{2 on 1 with notes}[a4paper,border shrink=5mm]` "with notes" argument.
I run the file either with MiKTeX 2.8 or 2.9, either under Windows XP or Windows 10.
Top Answer
samcarter
A similar layout can pretty easily be achieved with beamer:
```
\documentclass[handout]{beamer}
\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm]
\setbeameroption{show notes}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{{}}% used to be totally empty.
}
\makeatother
\usepackage{pgffor}
\setbeamertemplate{note page}{
\begin{minipage}[c][\textheight][c]{\textwidth}
Notes:\vfill
\foreach \x in {1,...,8}{
\hrulefill\vfill\par
}
\end{minipage}
}
\begin{document}
\begin{frame}
My first slide
\end{frame}
\begin{frame}
Second one
\end{frame}
\begin{frame}
Third
\end{frame}
\end{document}
```
![Screen Shot 2020-06-12 at 16.52.37.png](/image?hash=5ef1b8b82f20b09312dc822e88d942cd31f8ecd2922b56b3e0c13c246c6bd1f2)
What fixed it for me was replacing `\pageheight` with `\paperheight` everywhere in `handoutWithNotes.sty`. See also https://github.com/gdiepen/latexbeamer-handoutWithNotes/pull/5.