这里是我链入的JS
<script src="//mozilla.github.io/pdf.js/build/pdf.js"></script> <script> let pdfjsLib = window['pdfjs-dist/build/pdf']; pdfjsLib.GlobalWorkerOptions.workerSrc = '//mozilla.github.io/pdf.js/build/pdf.worker.js'; </script>
官方列子,https://mozilla.github.io/pdf.js/web/viewer.html
看它的例子 pagechanging 是如何挂载上去的
2.1m questions
2.1m answers
60 comments
57.0k users