diff --git a/theme/classic.html b/theme/classic.html index 0c3327b..42c6cd8 100644 --- a/theme/classic.html +++ b/theme/classic.html @@ -190,7 +190,7 @@ -
+
Loading PDF
@@ -590,10 +590,16 @@ pdfjsLib.GlobalWorkerOptions.workerSrc = '//cdn.bootcss.com/pdf.js/2.3.200/pdf.worker.min.js'; - var loadingTask = pdfjsLib.getDocument({ url: '', }); + var loadingTask = pdfjsLib.getDocument({ + url: '', + cMapUrl: "//cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/cmaps/", + cMapPacked: true, + rangeChunkSize: 65535 + }); loadingTask.promise.then(function(pdf) { var pagenum = pdf.numPages; var pdfContainer = document.getElementById('pdf-d'); + pdfContainer.innerHTML = ''; for (var i=1;i<=pagenum;i++) { var canvasNew = document.createElement('canvas'); canvasNew.id = 'pdf-c'+i;