>>>>>>>>>>>>>>>
"lopi" <lo**@iteam5.netwrote in message
news:11*********************@j27g2000cwj.googlegro ups.com...
On 16 Feb, 12:23, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
It seems to me you need to use the last one. You should probably use an
ADO
Stream object to save it to disk.
thanks Bob ...
actually i have changed the code in the meanwhile
------------
url = "http://remoteServer/file.pdf"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
Response.Buffer = TRUE
Response.ContentType = "application/pdf"
response.BinaryWrite xmlhttp.responsestream
------------
but again the browser displays only a part of the pdf file, not as PDF
obviously, but as a sequence of chars (%PDF-1.4 %˙˙˙˙ 6 0 obj <>
endobj xref 6 13 0000000016 00000 n 0000000719 00000 n 0000000795
00000 n 0000000928 00000 n 0000001048 00000 n 0000002524 00000 n
0000002558 00000 n 0000002777 00000 n 0000002971 00000 n 0000005640
00000 n 0000005867 00000 n 0000006088 00000 n 0000000556 00000 n
trailer <<150F4F63E5FC2F48B1DDB1CB337193D0>]>startxref 0 %%EOF 18 0
obj<>stream x˙˙``˙˙`˙˙`)
<<<<<<<<<<<<<<<<
I'm surprised you get even that. I wouldn't have thought ResponseStream
would be an acceptable value to pass to BinaryWrite. You should use
ResponseBody.
If you still get the same results change the last couple of lines to:-
Response.contentype = "text/html"
Response.Write LenB(xmlHttp.ResponseBody)
So you can discover the exact size of whats in it. You can therefore
determine which stage of the transfer to concentrate further investigations.