无法读取react.js中的pdf缓冲区

问题描述

这就是我从快递服务器得到的答复

i got the response from my express server

然后我解析pdf文件缓冲区以从浏览器中读取pdf

使用新的Blob()和window.URL.createObjectURL()

const file = new Blob(product.msds.data,{type:"application/pdf"});

const getFile = file && window.URL.createObjectURL(file);

             <a
                href={getFile}
                target="_blank"
                rel="noopener noreferrer"
                type="application/pdf"
              >
                click to show pdf
              </a>
            </>

then i parse the pdf file buffer

当我打开创建的链接时,浏览器无法加载PDF文档

and when i open the created link,the browser has failed to load PDF document

感谢您即将推出的解决方案!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)