Added methods for creating a temporary file and for opening a pdf with
the operating systems default pdf viewer