Move PDF generation to a plugin. Fixes #1009
Merge pull request #1010 from kylewm/pdf-plugin

Move PDF generation to a plugin (Fixes #1009)