1

I have a commercial program that stores PDF files to SQL 2005. I would like to be able to search for (I have that part) and then display the PDF file in a browser. It's the 'display the PDF file' that I'm having trouble with. I am using HTTP/ASP and would prefer to continue that way. I don't know anything about ASP.NET, so that would not be helpful to me. Any help would be appreciated. Thanks.

1

1 Answer 1

1

The best option here is to implement a HttpHandler that fetches the binary data from your database and outputs it to the response stream. This is the most efficient method available in ASP.Net.

There are many questions about HttpHandlers on SO, so implementing one should be easy: https://stackoverflow.com/questions/tagged/httphandler

One thing you should be aware of is that you should set the correct content type so that the browser recognices the pdf document.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.