28  Xpdf usage

Xpdf is a pretty good alternative to Adobe's Acrobat Reader. It has at least two advantages over Acrobat Reader:

Xpdf's disadvantages are:

For these reasons, I use Xpdf while building a presentation and use the Acrobat Reader for presenting my slides to an audience.

Running Xpdf inside a window

To display the file small.pdf, do:

xpdf small.pdf 

Navigate among your slides using the following key bindings:

Next slide n or SpaceBar or PageDown
Previous slide p or BackSpace or PageUp
Last slide Control-End
First slide Control-Home
Previous viewed slide b
Re-load file r
Quit q

Remark: The "Previous viewed slide" was explained in the Acrobat Reader usage.

Remark: To get a complete list of Xpdf's key binding, click the question-mark button that appears along Xpdf window's bottom edge.

Running Xpdf in the full-screen mode

To display the file small.pdf in the full-screen mode, do:

xpdf  -fullscreen  small.pdf 

Navigate among the slides with the same key binding that were described in the previous paragraph.

Advanced usage

Start up Xpdf with a command like "xpdf small.pdf" then resize the window using whatever hooks your window manager provides.

You will find out that the contents of the window remain at the original size -- they do not resize along with the window.

To tell Xpdf to resize the contents along with the window, invoke it as:

xpdf  -z page  small.pdf 

This is pretty handy while you are developing your slides: you can use your window manager's "maximize" function to toggle between normal and maximized states to get a better view of the slides.

I see no reason for not using the -z page flag all of the time. Therefore I have aliased xpdf to "xpdf -z page" and I recommend that you do it too. How you define an alias depends on the unix shell that you use. At UMBC's Department of Mathematics and Statistics we use tcsh. Therefore edit the file .cshrc in your home directory and add the following line to it:

alias xpdf xpdf -z page 

While you are editing your .cshrc, you might as well add the following lines:

alias xpdff xpdf -fullscreen 
complete xpdff 'n/*/f:*.{pdf,PDF}/' 

The first of these lines sets xpdff to be a an alias for "pdf -fullscreen", therefore you can now start a full-screen presentation by typing "xpdff small.pdf".

The second line tells tcsh that the newly created xpdff command expects files names ending in pdf or PDF. This is used when you hit the TAB key to complete a file name on the command line.

Where to get Xpdf

Xpdf is bundled with most Linux distributions. If for some reason you need to download, compile and install the package yourself, you can get the source from: http://www.foolabs.com/xpdf/.