download a pdf file before script