From 8e4b2c38396c65b6cce2a0b37cf9330e99ebb14b Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Fri, 17 Jan 2025 10:09:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9base64=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E7=9A=84=E5=88=86=E8=BE=A8=E7=8E=87=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/htmlPdf.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/htmlPdf.js b/src/utils/htmlPdf.js index 65f2567f..84f33c1e 100644 --- a/src/utils/htmlPdf.js +++ b/src/utils/htmlPdf.js @@ -9,8 +9,8 @@ const htmlToPdf = { taintTest: false, logging: false, useCORS: true, - dpi: window.devicePixelRatio * 4, // 将分辨率提高到特定的DPI 提高四倍 - scale: 4 // 按比例增加分辨率 + dpi: window.devicePixelRatio * 1, // 将分辨率提高到特定的DPI 提高四倍 + scale: 1 // 按比例增加分辨率 }).then((canvas) => { const pdf = new jsPDF('p', 'mm', 'a4') // A4纸,纵向 const ctx = canvas.getContext('2d'), @@ -55,8 +55,8 @@ const htmlToPdf = { taintTest: false, logging: false, useCORS: true, - dpi: window.devicePixelRatio * 4, // 将分辨率提高到特定的DPI 提高四倍 - scale: 4 // 按比例增加分辨率 + dpi: window.devicePixelRatio * 1, // 将分辨率提高到特定的DPI 提高四倍 + scale: 1 // 按比例增加分辨率 }).then((canvas) => { const pdf = new jsPDF('p', 'mm', 'a4') // A4纸,纵向 const ctx = canvas.getContext('2d'),