Hi,
Badis wrote:
Hi,
I have a PDF document saved as Binary Stream in my Database and I'm excuting
this line of code to open the PDF document:
Response.BinaryWrite(myfile); // myfile is the stream converted to byte[] type
and It's working fine, but the only problem that Acrobat Reader 8 is not
opening it directly but always asking me if I want to save it or Cancel. So,
I always have to save disk before opening it!!!? so what could be the issue
with Acrobat Reader 8.
The one asking you if you want to save or open is not Acrobat, it's the
web browser. The question is triggered by the user's configuration for
the give MIME type returned by the web server. In your case, the MIME
type is (or should be) "application/pdf". When the browser receives
this, it will check how it has been configured for this MIME type. If
not setting is found, or depending on what the user entered, he will
present the open/save dialog to the user.
So bottom line is: You cannot force the user to open the document
automatically if he doesn't want. You cannot control how each web
browser is going to react.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch