this is my code <a href="content.pdf">content</a> if i click the link . it is downloading the content.pdf file but i want to view that content.pdf file in my webpage i am new for this please help me.. thank's
The problem is not in the page code. Displaying pdf files is based on the user's browser. There are two parts: the browser's own capabilities-- possibly including optional plug-ins-- and the user's preference settings.
So if you are trying to ensure a certain behavior, it simply can't happen.
this isn't a browser/html issue - you need to fix this in the server response. which HTTP Response headers are provided with the pdf file? i would suggest that you need the following to meet your requirements: Content-type:application/pdf Content-length: Content-disposition:attachment; filename=[foo.pdf]
(phranque: content-disposition: attachment is meant to force a download - isn't it? Isn't that the problem salman is having already?)
Welcome aboard salman, if you are unable to VIEW them or they download automatically - it means either you don't have the plugin installed OR the server is not configured to serve .pdf's as PDF's (see first part of previous post.)
A corollary, if you have uploaded these pdf's in ASCII mode, they won't be viewable in any case. Make sure you upload PDF's in binary mode.
If you can VIEW the pdf file but want it "in the page" instead of "being the whole page" you will have to use an iframe or frames.