Date:  10/22/2002 11:51:46 PM Msg ID:  000948
From:  FoxWeb Support Thread:  000941
Subject:  Re: Displaying PDF
The method you are using should work, but doesn't always. In most cases the problem is caused by limitations/bugs in the Acrobat Reader plugin, but I was under the impression that this was fixed in recent versions. I have also seen similar problems with other environments, such as ASP and Cold Fusion.
 
Having said this, the fact that FoxWeb returns the PDF code without launching Acrobat puzzles me. Are you saying that you actually see the PDF code in the browser? If this is the case, then the problem is most probably related to an incorrect MIME header. Can you provide access to a server that exhibits this behavior and instructions on how to reproduce it? I will try to connect with a raw HTTP client to view all headers returned by your server.
 
Another recomendation, which is actually also made by Adobe, is to redirect users to a static file in the Web tree, instead of dynamically generating the file in the reply from a server-side script.
 
For your reference, you may also want to check the following articles:
 
http://www.adobe.com/support/techdocs/15d1e.htm
http://www.adobe.com/support/techdocs/29776.htm
http://www.adobe.com/support/techdocs/1c53e.htm
http://www.adobe.com/support/techdocs/1c1ae.htm
http://www.adobe.com/support/techdocs/29776.htm
http://www.adobe.com/support/techdocs/2aab6.htm
http://www.adobe.com/support/techdocs/cc72.htm
 

FoxWeb Support Team
support@foxweb.com email

Sent by Joe Cooperrider on 10/20/2002 06:00:56 PM:
Hello all,
 
I am trying to write a function that displays a pdf file. I have a variable to store the passed file name. I am then trying to display the file with the following:
 
m.lc_filename=formfield("PDFNAME")
HML_OUT="Content type: application/pdf"+chr(10)+chr(10)+readfile(m.lc_filename)
return
 
It works on a couple of files but on 99% of files it returns the pdf code without launching Acrobat.
 
Any ideas????
 
Thanks