From 278b438b7057c7e06259e0786ee1ea3856101442 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 6 Apr 2023 15:42:11 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/7900 --- app/src/protyle/export/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index 2d426db4c..e0dfb3baf 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -264,6 +264,7 @@ const renderPDF = (id: string) => { width = isLandscape ? 1632 : 1056 break; } + width = width / parseFloat(document.querySelector("#scale").value); previewElement.style.width = width + "px"; width = width - parseFloat(previewElement.style.paddingLeft) * 96 * 2; // 为保持代码块宽度一致,全部都进行宽度设定 https://github.com/siyuan-note/siyuan/issues/7692 @@ -430,6 +431,7 @@ const renderPDF = (id: string) => { const scale = actionElement.querySelector("#scale").value; actionElement.querySelector("#scaleTip").innerText = scale; previewElement.style.zoom = scale; + fixBlockWidth(); }) actionElement.querySelector("#pageSize").addEventListener('change', () => { fixBlockWidth();