Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > retrieving PDF file with ServerXMLHTTP object

Reply
Thread Tools

retrieving PDF file with ServerXMLHTTP object

 
 
=?Utf-8?B?QnJpYW4gQmFybmV0dA==?=
Guest
Posts: n/a
 
      02-14-2004
(Using the previous ASP technology, not ASP.NET. Sorry if this is the wrong newsgroup. If so, please point me in the right direction.)

I've just about got it working, except the browser is displaying binary data instead of using Adobe Acrobat to display the PDF.

Here is the source code I'm using:


Response.Buffer = False
Response.ContentType = "application/pdf"
set httpReq = Server.CreateObject("Msxml2.ServerXMLHTTP")
httpReq.open "GET", PDFFileURL, false
httpReq.send ""
if (httpReq.status <> 200) then
Response.Write("Error")
else
Response.BinaryWrite httpReq.responseBody
end if
set httpReq = nothing


If I type in the URL of the pdf file directly into the address bar of the browser, it opens it fine. I just can't get it to work using Response.BinaryWrite.

System Info:
W2K Pro
IIS 5.0
IE 6.0

I'd appreciate any suggestions.

Thanks,
Brian Barnett


 
Reply With Quote
 
 
 
 
=?Utf-8?B?QnJpYW4gQmFybmV0dA==?=
Guest
Posts: n/a
 
      02-15-2004
Installed the latest Adobe Acrobat Reader and it fixed it. hmph...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ServerXMLHttp Object anon ASP General 0 08-24-2009 08:52 PM
Postscript to PDF with pdf-tools, pdf-writer, or other Sean Nakasone Ruby 1 04-14-2008 09:13 PM
PDF::Writer, create pdf and insert in other pdf file. Ricardo Pog Ruby 1 03-26-2008 08:24 PM
how to copy mp3/audio file in ASP using ServerXMLHTTP Spydrlink ASP General 2 01-11-2008 01:56 PM
Get File from FTP Server - ServerXMLHTTP SPRFRKR ASP General 0 01-03-2007 12:40 AM



Advertisments