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:
Sent by Joe Cooperrider on 10/20/2002 06:00:56 PM:
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:
HML_OUT="Content type: application/pdf"+chr(10)+chr(10)+readfile(m.lc_filename)
It works on a couple of files but on 99% of files it returns the pdf code without launching Acrobat.