hi, how to detect if a pdf file has been downloaded completely? thanks.