renderring pdf on an .aspx page

A

Ather Hashmi

hey all,
I am doing a project in which at one stage i have to display the pdf
document (that i have saved using document modelling) to the user. I am
having troubles to impliment that. I may sound unclear but any help is highly
appreciated....

many many thanks
 
Joined
May 16, 2006
Messages
27
Reaction score
0
I am not clear what you exactly want,
but there are two approaches

If you are storing the pdf file physically on the location, you can just provide a hyperlink to that location.

If you are storing the pdf file in the database, you can use Response object to display the pdf file,

Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "attachment; filename=Report.pdf")
Response.AddHeader("content-disposition", "inline; filename=Report.pdf")
dim memStream as New System.IO.MemoryStream
' ...... Get the data from database to memory stream
Response.BinaryWrite(memStream.ToArray())
Response.End()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,826
Members
47,371
Latest member
Brkaa

Latest Threads

Top