插件pdfobject.js官方连接:https://pdfobject.com/浏览器
a、建立盒子,能够对个盒子example1经过style添加样式dom
<style> .pdfobject-container { height: 30rem; border: 1rem solid rgba(0,0,0,.1); } </style> <div id="example1"></div>
b、引入插件url
<script src="js/pdfobject.min.js"></script> <script> PDFObject.embed( "/pdf/sample-3pp.pdf", "#example1" ); </script>
PDFObject.embed(url [string], target [mixed], options [object]).net
a、url [string]即为pdf的连接;
b、target [mixed] 指定dom节点;
c、options [object]初始化配置选项插件
开放接口view:
基本参数: Fit FitH FitH, top FitV FitV, left FitB FitBH FitBH, top FitBV FitBV, left 至此不在一一介绍:请查看文档https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/pdf_open_parameters.pdf
参考连接:
一、https://pdfobject.com/
二、pdf官方开放接口: https://www.adobe.com/content...
三、https://blog.csdn.net/badgirl...code