|
@@ -37,8 +37,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
pdfTask (pdfUrl) {
|
|
|
- var loadingTask = pdf.createLoadingTask(pdfUrl)
|
|
|
+ let CMAP_URL = 'https://unpkg.com/pdfjs-dist@2.0.943/cmaps/'
|
|
|
+ var loadingTask = pdf.createLoadingTask({url: pdfUrl,withCredentials: false,cMapUrl: CMAP_URL,cMapPacked: true})
|
|
|
loadingTask.promise.then(pdf => {
|
|
|
+
|
|
|
this.pdfUrl = loadingTask
|
|
|
this.numPages = pdf.numPages
|
|
|
}).catch((err) => {
|