Jump to content

Open Pdf within a section of a page.


jkkenzie

Recommended Posts

Can i open a pdf within a page? e.g. within <td> or <table> of htmls so that it appears on a section of a page where someone can just read through and still able to browse the web page. I dont want the PDF downloading or taking the whole page or even opening a new window and filling it.

 

Thanks in advance.

 

Link to comment
Share on other sites

Embedding a PDF using <object> element is actually rather simple, and looks like this:

 

<object data="example.pdf" type="application/pdf" width="100%" height="100%">

 

  <p>It appears you don't have a PDF plugin for this browser.

  you can <a href="example.pdf">click here to

  download the PDF file.</a></p>

 

</object>

 

Note the <p> nested inside the <object>; this content will be displayed if the browser isn't capable of displaying the <object>. In this example, the 'fallback' content contains a link to the PDF, which allows visitors who don't have the Adobe Reader plugin to download the PDF and view it offline.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.