浏览代码

调整pdf渲染缩放大小

jwyu 4 月之前
父节点
当前提交
e375b4c7fc
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/components/PreviewPDF.vue

+ 1 - 1
src/components/PreviewPDF.vue

@@ -42,7 +42,7 @@ async function loadPage(pageNum) {
     loadingPages.value.push(pageNum)
     try {
       const page = await pdfDoc.getPage(pageNum);
-      const viewport = page.getViewport({ scale: 4 });
+      const viewport = page.getViewport({ scale: 2.5 });
       const canvas = document.getElementById(`pdfCanvas${pageNum-1}`)
       const context = canvas.getContext("2d");