unified getPdf functions, fixes #74