• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

pdf in a browser

Right now, i have a function which returns a pdf and let user save or open it from a webpage.
--------------------------------------------------
 HttpContext.Current.Response.ClearContent()
 HttpContext.Current.Response.ContentType = "application/pdf"
 HttpContext.Current.Response.AppendHeader("content-length", data.Length.ToString())
 HttpContext.Current.Response.ClearHeaders()
 HttpContext.Current.Response.AddHeader("Content-Disposition", "filename=temp.pdf")
 HttpContext.Current.Response.BinaryWrite(data)
 HttpContext.Current.Response.Flush()
 HttpContext.Current.ApplicationInstance.CompleteRequest()
----------------------------------------------------------------------------------------------------
i want to have a "View/Print" button on the page, which will open it in a browser and user can print or save from there as well.  What happens if PDF plugin is missing?
0
singsunn
Asked:
singsunn
1 Solution
 
Easwaran ParamasivamCommented:
If adobe reader is not installed the pdf could not be viewed. Verify whether it is installed using the code mentioned in below link. If not, alert the user.

http://stackoverflow.com/questions/1715299/check-if-adobe-reader-is-installed-on-client-machine
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now