Print multiple slides on one page (handouts) with Beamer

I like to create my presentations with the LaTeX Beamer class. However, the resulting pdf file is not ideal for printing (this is not related to LaTeX or Beamer, but to pdf presentations in general). I don’t like that I have to print one slide per page, what results in huge slides (and paper waste), or multiple pages (i.e. slides) per sheet that are badly scaled because of the dimensions of the slide (that are not a4 or letter).

In Microsoft PowerPoint, one has the option to print slides as handouts, where my preferred option is a left column containing three slides and a right column with three times space to make some notes.

This is how the same can be achieved in Beamer – LaTeX. Just put the following lines in the preamble of your *.tex file:

% print multiple slides per page draw border around slide
usepackage{pgfpages} 

% print with space for notes
usepackage{handoutWithNotes} 

% put 3 slides on 1 page with space for notes
pgfpagesuselayout{3 on 1 with notes}[a4paper, border shrink=5mm]

% settings to draw border around every first 3 slide per sheet
pgfpageslogicalpageoptions{1}{border code=pgfusepath{stroke}}
pgfpageslogicalpageoptions{2}{border code=pgfusepath{stroke}}
pgfpageslogicalpageoptions{3}{border code=pgfusepath{stroke}}

The result is something like this:
pg_001