Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning an inline pdf
Message
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00988459
Message ID:
00988472
Views:
45
Hi Don,

The headers you listed should be sufficient. This is how returning a PDF file works in AFP:
<%
  * generate the PDF file and read it into lcPDF
  * FILETOSTR() is just an example
  lcPDF = FILETOSTR(JUSTPATH(FILE.GetLocation())+"\Sample.PDF")

  * Display the PDF file in the browser
  Response.ContentType = "application/pdf"
  Response.AddHeader( "Content-Disposition", "inline" )
  Response.BinaryWrite(m.lcPDF)
  
Make sure the Content-Length header is exactly the size of the PDF file and you don't send anything else to the browser.
--
Christof
Previous
Reply
Map
View

Click here to load this message in the networking platform