Generating pdf documentation, fixes #476.