pdf.js使用web workers: // Specify the main script used to create anew PDF.JS web worker.
// In production, change this to point to the combined `pdf.js` file./src/worker_loader.js'
当尝试从npm安装的pdfjs中使用PDF.JS时,pdf不会呈现,并且控制台中没有显示任何错误。当使用在线资源(例如//mozilla.github.io/pdf.js/build/pdf.worker.js)时,可以很好地呈现PDF。这是我正在使用的代码,几乎直接取自this example <script type="text/javascript" src="node_modules/pdfjs-dist/build/