From e3e0f7f27db5389896968a246efe6c8f29dc1e11 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Mon, 3 Aug 2020 13:47:27 +0800 Subject: [PATCH] fix: some pdf font --- theme/classic.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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;