我有一个关于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获得更多信息,
我想使用nw.js和pdf.js制作一个非常简单的原生PDF查看器。它读取包文件并提取包含有效PDF文件的缓冲区。bufferStream.end(pdfbuffer); // pdfbuffer is the PDF file's buffer// viewer.js from PDF.JS
var DEFAULT_URL = 'compressed.tracemonkey-p
我是pdf.js的新手,可能会犯一些基本的错误。我正在尝试复制这里提供的"Hello World with document load error provided“示例: https://mozilla.github.io/pdf.js/examples我试着改变了 <script src="//mozilla.github.io/pdf.js/build/pdf.js"></
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.