i am having problem displaying my pdf files directly on the browser.each time i click on the relative link to the pdf file, i am prompted to download it first before reading it.
but that is not what i want, i want it to display directly as it is on the browser.
i need your help. thanks
pdf file display
Moderator: General Moderators
Re: pdf file display
You can embed PDF content into valid XHTML by using the <object> tag.
If the user's browser has the appropriate plugins, the document will be embedded into the page. If not, the content inside the object tags will be rendered - in this case, a simple link to the document.
Google search for "embed PDF object" for more examples.
Code: Select all
<object data="somefile.pdf" type="application/pdf" width="770" height="500">
download the document: <a href="somefile.pdf">somefile.pdf</a>
</object>
Google search for "embed PDF object" for more examples.