Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Showing PDF documents from a SQL Database

Reply
Thread Tools

Re: Showing PDF documents from a SQL Database

 
 
dave wanta
Guest
Posts: n/a
 
      07-03-2003
This is just off the top of my head, so let me know if it doesn't work. Be
gentle <grin>

Once you have the pdf bytes from the database, something like this *should*
work

byte[] bytes = GetPdfBytes(); //your function that gets the bytes from sql
server
Response.ContentType = "application/pdf"; //you may need to check the
exact Mime type of a pdf doc
Response.OutputStream.Write( bytes, 0, bytes.Length );
Response.End();

Cheers!
Dave
www.aspNetPOP3.com
"Chris Roden" <> wrote in message
news:052101c3410a$81453260$...
> I have PDF documents stored in a SQL Database. How can I
> display the PDF document straight from the database
> without creating a file?
>
> Chris Roden
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Database Database Database Database scott93727@gmail.com Computer Information 0 09-27-2012 02:43 AM
DataBase DataBase DataBase DataBase scott93727@gmail.com Computer Information 0 09-26-2012 09:40 AM
Reading SQL Server varbinary (word, excel, pdf...) documents in browser desaitapan1 ASP .Net 0 12-29-2010 03:39 PM
Showing documents stored in the database in the browser =?Utf-8?B?c2FtZWVy?= ASP .Net 1 10-13-2006 11:47 PM
Export Documents from SQL Database to Local PC or Server manmit.walia@gmail.com ASP .Net 2 06-30-2006 01:56 PM



Advertisments