gjTool / pdfh5

web/h5/移动端PDF预览插件
https://www.gjtool.cn/pdfh5/pdf.html
MIT License
959 stars 239 forks source link

在线的地方带参数的话,无法识别 #30

Closed truejiang closed 4 years ago

truejiang commented 5 years ago

比如带的公网访问的地址是 https://www.xxx.com?aaa=aaa&bbb=bbb&ccc=ccc 这种情况只能识别到 https://www.xxx.com?aaa=aaa,后面的 &bbb=bbb&ccc=ccc 没有请求,导致无法解析pdf

gjTool commented 4 years ago
$.ajax({
    url: "http://gjtool.cn/pdfh5/git.pdf", //假设这是pdf文件流的请求接口
    type: "get",
    mimeType: 'text/plain; charset=x-user-defined',//jq ajax请求文件流的方式
    cache: false,
    success: function (data) {
        var pdfh5 = new Pdfh5('#demo', {
            data: data
        });
    }
});

参照上面的代码