The Haskell Pdf Presenter (hpdfp
) is a tool for presenting PDF-based slide shows.
For example, as a presenter, I like to see
the next slide before it is shown to the audience
as well as how much allotted time remains.
I was never quite satisfied with the existing
tools for this, so I wrote my own and
hpdfp
is the result.
Though I originally wrote it for my own use, the tool
has matured over time, and I now wish to share it with others.
Aside from being a useful tool, I think hpdfp
is a good example
of elegance and economy in program design. Despite being only a thousand lines
long, this program is full of features that may not be obvious at first glance
so please be sure to look at the help and documentation.
For help with the command line, use the --help
flag.
For help with the GUI, press the ?
key when the program is running.
The README
contains a terse summary of all the features.
The program is available on Hackage as the haskell-pdf-presenter package.
The repository is available at http://michaeldadams.org/repos-pub/hg/haskell-pdf-presenter/.
If you have any questions, bug reports or feature requests please feel free to contact me.
Due to an API change, the GTK libraries that hpdfp
depends on
(e.g., poppler
, glib
, etc.) currently
cannot be built with Cabal
1.18.
If you have Cabal
1.18 installed, you will see an error like
the following when installing them.
/tmp/gtk-0.12.4-7461/gtk-0.12.4/SetupWrapper.hs:94:45:
Ambiguous occurrence `moreRecentFile'
However, these libraries all work with Cabal
1.16
so the following commands should successfully install them.
$ cabal install Cabal-1.16.0
$ cabal install --cabal-lib-version=1.16.0 poppler
The simplest use case for this application is delivering a talk at a conference:
$ hpdfp --start-time=20:00 --warning-time=5:00 presentation.pdf
This command will start hpdfp
with a 20 minute timer that will start
counting down after the first slide-change command and that will turn
red once you have only 5 minutes left. Once you have no time left,
the timer will turn purple and start counting negative time.
Instead of using command line options, you can also use Ctrl-C
to open the clock configuration dialog and Ctrl-O
to
open the file dialog.
There are many more features for this use case, so please have a look at the documentation. In particular, note that there are shortcuts for going to a particular slide number, blanking the screen to either black or white (i.e., video mute), slide history commands, and a thumbnail view where you can click to go directly to a slide.
If you don’t find what you are looking for, please drop me a line.
I find it useful to
write a small script, present.sh
, that launches hpdfp
with all the appropriate command line options for a particular
talk so I don’t
have to think about or fumble around with options when I get up to talk.
After connecting to an external projector, pressing M
will
move the audience window to the external monitor or projector. Further presses
cycle the audience and presenter windows between the different monitors.
To toggle full-screen mode press F
.
If you are on the first slide of the talk and try to go to the previous slide, the slide obviously won’t change, but the timer will still automatically start. This makes it possible to start the timer from a remote clicker while still remaining on the first slide.
To go to a specific slide, press the Tab
key to
toggle the presenter window between preview mode and a scrollable
thumbnail mode. Then click on the slide you want.
You can adjust how much of the presenter’s window
shows the current and next slides by dragging
the “gripper” dividing the two.
You can also use =
to cycle between common pre-defined settings (full left, fit left view, one-third, half-and-half, etc.).
Finally, the [
and ]
keys can be used to manually adjust the devision,
and you can specify an exact percentage on the command line
with the --preview-percentage
option.
Another use case is when acting as a session chair:
$ hpdfp --start-time=20:00 --warning-time=5:00
This command, while similar to the proceeding one, doesn’t load a PDF document. If you resize the clock to fill the window by dragging the small white “gripper” above it, you now have a big timer display for showing your speakers how much time they have left.
To start the clock, simply press P
, and to reset the clock for the
next speaker press Shift-C
. (To reduce the chance of accidental
presses, irreversible commands all require a modifier key such as
Shift
, Ctrl
or Alt
.)
When teaching in a class, it is important to know the actual wall clock time
instead of the relative remaining time. Likewise, when timing a new
talk, it may be important to know the elapsed time rather than the remaining time.
Both of these use cases are possible by either pressing C
to cycle the clock
mode or passing the appropriate argument to the --clock-mode
option.
Finally, hpdfp
is very efficient with regard to memory usage (<0.6MB per slide), so
if, for example, you are hosting a series of lightning talks, it is perfectly reasonable
to open multiple instances of hpdfp
with the slides of the speakers
and the appropriate timer settings all ready to go.
Alternatively,
since hpdfp
loads quickly (<340ms) and pre-renders in the background,
you can write a small script
to load the talk for the next speaker after the previous one quits:
$ cat talks.sh
hpdfp --fullscreen presentation1.pdf
hpdfp --fullscreen presentation2.pdf
hpdfp --fullscreen presentation3.pdf
When it is time to move from one speaker to the next,
just press Ctrl-Q
to quit one instance of hpdfp
and let the script load the next.
Note that if their are multiple monitors connected,
hpdfp
automatically places the presenter
window on monitor 0
(which is usually the built-in LCD or monitor)
and the audience window on monitor 1
(which is usually the projector).
If you want those windows put on different monitors,
you can control this with the
--presenter-monitor
and --audience-monitor
flags.