Subscribe to Subscribers
Talk to Webmaster Tony John

Online Members

Phagu Mahato
More...


Forums » .NET » ASP.NET »

Displaying the pdf file


Posted Date: 27 Nov 2009      Posted By:: k.anantharengan     Member Level: Gold    Member Rank: 709     Points: 1   Responses: 2



I had uploaded a pdf file in my application(using file upload control) and saved it as an image datatype in SQL server 2005 table.I checked the DB it is getting the file in a binary format .My question is how to display the Pdf file stored in DB ?.if i select a pdf file stored in a table it should open in a new window.

any useful links and code snippets will be welcomed .Remember i am storing the pdf file using a image datatype.


with regards
k.anantharengan




Responses

#448052    Author: Viji RAJKUMAR      Member Level: Gold      Member Rank: 122     Date: 28/Nov/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi,

Refer my link

http://dotnetspider.com/projects/512-Store-Retrieve-pdf-txt-doc-Images-Sql-server-database.aspx

Regards

VIJI RAJKUMAR
Pls rate my Answer if it was supportive
http://vijirajkumar.blogspot.com



 
#448054    Author: Viji RAJKUMAR      Member Level: Gold      Member Rank: 122     Date: 28/Nov/2009   Rating: 2 out of 52 out of 5     Points: 2

Hi,

You haven't mentioned whether asp.net/windows form

For windows forms
If you want to display the pdf file in the embedded form, you can use
pdf viewer.

Sample code of mine:


Dim Adobepdf As New AxAcroPDFLib.AxAcroPDF


Adobepdf.Dock = System.Windows.Forms.DockStyle.Fill
Adobepdf.Enabled = True
Adobepdf.Location = New System.Drawing.Point(0, 0)
Adobepdf.Name = "Adobepdf"
Adobepdf.Size = New System.Drawing.Size(556, 384)
Adobepdf.TabIndex = 3


Me.PanelContainer.Controls.Clear()
Me.PanelContainer.Controls.Add(Adobepdf)

Dim ctl As AxAcroPDFLib.AxAcroPDF
ctl = Adobepdf
If System.IO.File.Exists(sFileFullPath) Then
ctl.LoadFile(sFileFullPath)
Else
MsgBox("Could not load file")
End If


Regards

VIJI RAJKUMAR
Pls rate my Answer if it was supportive
http://vijirajkumar.blogspot.com



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : How to interchange the rows in sql
Previous : File Uploading and Downloading
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.