adding a one second delay to the example script to ensure the pdf is opened before it is deleted.