Android Question Download PDF file is corrupted using HTTPUtils2

phukol

Active Member
Licensed User
Longtime User
Hi guys. im using HTTPUTils2 to download my PDF. Its able to download but all the doanloaded pdf files cannot be opened because they are corrupted. my code is:


ProgressDialogShow("Downloading PDF...")
Dim job1 As HttpJob
job1.Initialize("downloadPDF", Me)
job1.Download(url)


to open the file i use :

File.Copy2(Job.GetInputStream, File.OpenOutput(File.DirRootExternal, strOpenFile, False))
Dim In As InputStream
In = File.OpenInput(File.DirRootExternal , strOpenFile)
OpenPDF
In.Close

i tried opening the downloaded files using desktop pdf app but it also says theyre corrupted. i also notice that the file size sis smaller then the actual file size of the working pdf.
 
Top