Fix building PDF documentation

closes #1392