1.创建容器存放PDF
<div id="example1"></div>
2.引入js文件和PDF文件
<script src="/js/pdfobject.js"></script>
<script>PDFObject.embed("/pdf/sample-3pp.pdf","#example1");</script>
3.可使用CSS更改高度、宽度、边框、边距等
<style>
.pdfobject-container
{height:30rem;border:1rem solid rgba(0,0,0,.1);}
</style>