PDF and epub export of Knowledgeblog articles
The case for export options
Whilst the web version of a Knowledgeblog article is considered canonical, there is a strong argument for allowing the export of articles in other formats. PDF and EPUB formats are considered to be of particular importance. PDF’s allow researchers to maintain their normal workflow of downloading and archiving articles of interest into an existing document manager such as Papers or Mendeley. The EPUB format is gaining wide acceptance due to the emerging market for e-book readers.
PDF export from WordPress
A number of plugins can export PDF renderings of WordPress posts, we looked at two closely for release on Knowledgeblog.
The plugin has the following features:
- Allow PDF export only to logged in users
- Display PDF links on front page posts as well as in posts
- Exlude pages by post or page IDs
- Custom icon positioning for the PDF download icon
- Custom icon for the PDF download button
- Accomodate runtime changes from other plugins
- Process shortcodes
- Add a custom header logo to each PDF
- Font selection for header, footer and content
The plugin has the following features:
- Custom header/footer HTML. Custom HTML for title and final pages
- Customisable download links, header titles and subtitles
- Autogenerate PDF’s on publish and update
- Include images and process shortcodes from other plugins
- Convert embedded YouTube videos
- Custom content font size
- Use post slug for PDF filename instead of ID
- Show on home, category, tag and search pages
It’s arguable that in the first instance PDF Creation Station offers the cleanest output. It can be modified to include appropriate branding. WP Post to PDF is limited in a multi-site installation as the branding can only be applied at the plugin level, and all sites on a single WP3 installation will have the same branding graphically. This could be easily modified to produce branding on a per-blog basis, by allowing a custom field to point to a previously uploaded image.
Although both plugins use the same underlying PHP PDF generator (TCPDF) there were a number of differences with the resulting PDF exports. The Knowledgeblog Mathjax-LaTeX plugin processed shortcodes are not processed, althouth this was expected. Testing with other posts that utilised the KCite plugin and the Post Revision Display plugin, showed that only WP Post to PDF processed the additional post content generated by the plugins and also was able to correctly parse the shortcodes in KCite. Consequently the recommendation is that WP Post to PDF is the renderer of choice for Knowledgeblog articles.
EPUB export from WordPress
This was installed on a test site to see how much of a Knowledgeblog article is captured in terms of formatting. The plugin compares very favourably to WP Post to PDF in terms of processing the full range of a Knowledgeblog article, including KCite shortcodes, bibliography and Post Revision Display information. As expected MathJax-LaTeX shortcodes are not processed to graphics in the output. It should also be noted that the epub files are only created when a post is created or updated, so it cannot be retrospectively applied to posts that exist prior to the plugin installation. This is not an issue for the PDF plugins listed.
Testing did reveal that the EPUB format output, in terms of readability, depends very much on the EPUB format reader. Using the free Stanza reader for Mac OS X produced on-screen output of poor quality. Reading the same EPUB exported Knowledgeblog article read on Adobe Digital Editions produced an extremely high quality on-screen read.
PDF and EPUB export of Knowledgeblog articles allow content to be filed, archived and integrated into a researchers existing workflow for handling publications (e.g. via Mendeley, Papers, Cite-U-Like or Connotea). Additionally content can be propogated to other devices for reading offline. However it must be reiterated that as a Knowledgeblog is potentially subject to changes after publication (if the Knowledgeblog is Public Review for instance) any item downloaded may not, in the future, accurately reflect the online article.