From c528a2fcaf6d971b31a8f3b3d6b28f89c0a47ea9 Mon Sep 17 00:00:00 2001 From: "mula.liu" Date: Tue, 3 Feb 2026 15:53:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app.js b/src/app.js index 4e65b6c..3239f25 100644 --- a/src/app.js +++ b/src/app.js @@ -221,8 +221,8 @@ async function processSingle(item) { img = await getPdfPreview(item.file); item.originalImg = img; originalInfo.innerHTML = ` -

Type: PDF (NotebookLM)

-

${i18n.t('info.size')}: ${(item.file.size / 1024 / 1024).toFixed(2)} MB

+
Type: PDF (NotebookLM)
+
${i18n.t('info.size')}: ${(item.file.size / 1024 / 1024).toFixed(2)} MB
`; setStatusMessage('NotebookLM PDF Detected', 'success'); } else { @@ -235,9 +235,9 @@ async function processSingle(item) { const watermarkInfo = engine.getWatermarkInfo(img.width, img.height); originalInfo.innerHTML = ` -

${i18n.t('info.size')}: ${img.width}×${img.height}

-

${i18n.t('info.watermark')}: ${watermarkInfo.width}×${watermarkInfo.height}

-

${i18n.t('info.position')}: (${watermarkInfo.position.x},${watermarkInfo.position.y})

+
${i18n.t('info.size')}: ${img.width}×${img.height}
+
${i18n.t('info.watermark')}: ${watermarkInfo.width}×${watermarkInfo.height}
+
${i18n.t('info.position')}: (${watermarkInfo.position.x},${watermarkInfo.position.y})
`; } @@ -279,13 +279,13 @@ async function processSingle(item) { if (item.isPdf) { processedInfo.innerHTML = ` -

${i18n.t('info.status')}: ${i18n.t('info.removed')}

-

Output: PDF

+
${i18n.t('info.status')}: ${i18n.t('info.removed')}
+
Output: PDF
`; } else { processedInfo.innerHTML = ` -

${i18n.t('info.size')}: ${img.width}×${img.height}

-

${i18n.t('info.status')}: ${i18n.t('info.removed')}

+
${i18n.t('info.size')}: ${img.width}×${img.height}
+
${i18n.t('info.status')}: ${i18n.t('info.removed')}
`; } @@ -459,7 +459,7 @@ async function processPdf(file, onProgress) { for (let i = 1; i <= total; i++) { if (onProgress) onProgress(i, total); const page = await pdf.getPage(i); - const viewport = page.getViewport({ scale: 2 }); + const viewport = page.getViewport({ scale: 3 }); const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); canvas.width = viewport.width; @@ -488,7 +488,7 @@ async function processPdf(file, onProgress) { const cleanedCanvas = await engine.removeWatermarkFromImage(canvas, { forceSimpleClone: true }); - const imgData = cleanedCanvas.toDataURL('image/jpeg', 0.9); + const imgData = cleanedCanvas.toDataURL('image/jpeg', 0.95); // Capture first page as preview if (i === 1) {