在web开发时我们有时会需要在线预览PDF内容,在线嵌入pdf文件
常用的几种PDF预览代码片段如下:
方法一:
<object type="application/pdf" data="file:///D:/atm/prtPDF/2016-07-28622262104000373211200009087.pdf" id="review" style="800px; height:750px; margin-top:45px; margin-left:500px" > </object>
方法二:
<embed src="file:///D:/atm/prtPDF/2016-07-28622262104000373211200009087.pdf" id="review" style="800px; height:750px; margin-top:45px;margin-left:500px" > </embed>
方法三:
<iframe src="../../../../../assets/1.pdf" style="100%;height: 100%">
</iframe>