Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return a PDF file to the browser
Message
From
12/09/2005 08:20:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Return a PDF file to the browser
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01048693
Message ID:
01048693
Views:
59
Hi All

I am trying to return a pdf file to the users browser but it does not work. The browser first displays an "Open/Save" dialog and then when I choose open I get the raw binary instead of the browser launching Adobe and displaying the PDF file. I am using:
* lcPDF_File contains the complete path to the pdf file on the server

Response.Clear()
Response.AddHeader( "Content-Length", STR( LEN( lcPDF_File ) ) )
Response.ContentType = "application/pdf"
Response.Write( lcPDF_File )
What am I doing wrong and how can I send back the pdf file so that the browser just opens and displays it?

Thanks

Update: I have the solution to the Response.Write() method. I was missing a Response.End statement. Thanks all.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Next
Reply
Map
View

Click here to load this message in the networking platform