未验证 提交 e3e0f7f2 编写于 作者: Q qkqpttgf 提交者: GitHub

fix: some pdf font

上级 a3b14300
......@@ -190,7 +190,7 @@
<audio src="<!--FileDownUrl-->" controls="controls" style="width: 100%"></audio>
<!--IsmusicFileEnd-->
<!--IspdfFileStart-->
<div id="pdf-d"></div>
<div id="pdf-d">Loading PDF</div>
<!--IspdfFileEnd-->
<!--IsofficeFileStart-->
<iframe id="office-a" src="https://view.officeapps.live.com/op/view.aspx?src=<!--FileEncodeDownUrl-->" style="width: 100%;height: 800px" frameborder="0"></iframe>
......@@ -590,10 +590,16 @@
<!--IsvideoFileEnd-->
<!--IspdfFileStart-->
pdfjsLib.GlobalWorkerOptions.workerSrc = '//cdn.bootcss.com/pdf.js/2.3.200/pdf.worker.min.js';
var loadingTask = pdfjsLib.getDocument({ url: '<!--FileDownUrl-->', });
var loadingTask = pdfjsLib.getDocument({
url: '<!--FileDownUrl-->',
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册