PDFJS插件带添加header以及携带授权
// use PDFJS this.loadingTask =window.pdfjsLib.getDocument({ url: url, withCredentials: true, // 携带凭证 httpHeaders: {}, // 添加header cMapPacked: true, cMapUrl: 'cmaps地址' }) this.loadingTask.promise.then(pdf => { })
// use PDFJS this.loadingTask =window.pdfjsLib.getDocument({ url: url, withCredentials: true, // 携带凭证 httpHeaders: {}, // 添加header cMapPacked: true, cMapUrl: 'cmaps地址' }) this.loadingTask.promise.then(pdf => { })