Win a copy of Functional Reactive Programming this week in the Other Languages 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: 48
  • 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