This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying pdfs from MS SQL Server

 
Srinivas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to display pdfs stored as an image datatype in MS Sql server on a webpage. I am doing this to hide the location of the pdf. Is there a way to do this.
thanks in advance
srinivas
 
Joe Pardi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to open the response output stream and write the bytes to it. Also, make sure to set the content type ("application/pdf"), the content length, and also the content disposition.
response.addHeader("Content-Disposition", ";filename=mypdf.pdf");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic