Improved function to allow download of PDF file

Minor change for pdf download