What is the best way to show PDF file in DIV.
I need to show generated PDF into one of the tab of jquery Accordian tab.
Can any one guide what is the best way to move.
我使用下面的选项嵌入:
<embed src="pdfFiles/interfaces.pdf" width="600" height="500" alt="pdf" pluginspage="http://www.adobe.com/products/acrobat/readstep2.html">
Try using this
<div class="PDF">
<object data="your.pdf" type="application/pdf" width="750" height="600">
alt : <a href="your.pdf">your.pdf</a>
</object>
</div>
$obj = $('<object>'); $obj.attr("data","http://infolab.stanford.edu/pub/papers/google.pdf"); $obj.attr("type","application/pdf"); $obj.addClass("w100"); $("#pdfdiv_content").append($obj);
#pdfdiv_content{ width:100%; height:250px; border:1px solid #0000FF; position:relative; height:800px; } .w100{ width:100%; position:absolute; height:100%; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script> <div id="pdfdiv_content"></div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.