移动端pdf展示预览

引用文件

pdfh5链接

1、css

<link rel="stylesheet" type="text/css" href="css/pdfh5.css"/>

2、html

<div id="pdf"></div>

3、js

<script src="./js/jquery-3.4.1.min.js" type="text/javascript"></script>
<script src="js/pdfJS/pdf.js" type="text/javascript"></script>
<script src="js/pdfJS/pdf.worker.js" type="text/javascript"></script>
<script src="js/pdfJS/pdfh5.js" type="text/javascript"></script>
<script>
	var  pdfh5 = new  Pdfh5('#pdf', {

		pdfurl:  "files/demo.pdf"

	});


</script>

来源

猜你喜欢

转载自blog.csdn.net/qq_40557812/article/details/105489094