The PDF option took me a while to work out, so this may be helpful?
Merge pull request #116 from enewton/pdf_example

The PDF option took me a while to work out, so this may be helpful?