jkkenzie Posted September 21, 2010 Share Posted September 21, 2010 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 https://forums.phpfreaks.com/topic/213979-open-pdf-within-a-section-of-a-page/ Share on other sites More sharing options...
chintansshah Posted September 21, 2010 Share Posted September 21, 2010 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 https://forums.phpfreaks.com/topic/213979-open-pdf-within-a-section-of-a-page/#findComment-1113602 Share on other sites More sharing options...
jkkenzie Posted September 21, 2010 Author Share Posted September 21, 2010 Thank you very much, its lovely. Link to comment https://forums.phpfreaks.com/topic/213979-open-pdf-within-a-section-of-a-page/#findComment-1113607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.