我有一个关于PDF.js和CORS配置的问题。
我从域A将PDF.js加载到iframe中,参数为文件(服务器的完整路径,它将返回一个pdf文档)。PDF.js将使用origin: domain A向域B中的服务器创建请求。在我的网络选项卡中,我看到对服务器的请求,它返回一个200 status OK,但PDF.js抛出了一个错误Unexpected server response (0) while retrieving问题是,这里发生了什么,CORS看起来还好,但我真的无法从PDF.js</e
当尝试从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/
no such file or directory, open '/---/---/-----/----/src/node_modules/ngx-extended-pdf-viewer/assets/pdf.js'
"scripts": [ "node_modules/ngx-extended-pdf-viewer/assets/pdf.js", "node_modul
按照pdf.js网站上的示例,我知道如何在客户端渲染pdf,但在服务器端渲染时会遇到问题。我用npm i pdfjs-dist下载了这个包var url = 'https://raw.githubusercontent.com/mozilla/pdf.js我得到了以下错误:
message: 'The browser/environment lacks native support for critical functionality u