如何在react-native-webview中使用blob url下载pdf

问题描述

PDF 显示在 ios 预览中。 响应网址:blob:baseurl/e4fb3bfa-270b-4799-8330-6e0e061ee875

let xnr = new XMLHttpRequest();
        xnr.open('GET',navstate.url,true);
        xnr.responseType = 'blob';
        xnr.onreadystatechange = function(e) {
          if (this.status === 200) {
            let url = window.URL || window.webkitURL;
            let pdf = url.createObjectURL(this.response)
          } else {
            console.log(e)
          }
        }
        xnr.send();

解决方法

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

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

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