Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/pull/16537

Vanessaba9c58ede6c3
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index f509900a75..9bea3a382c 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -648,7 +648,7 @@ ${getIconScript(servePath)}
};
return pageSizes[actionElement.querySelector("#pageSize").value];
};
- const previewHeight = previewElement.scrollHeight / 96 - (parseFloat(document.querySelector("#marginsTop").value) || 0) - (parseFloat(document.querySelector("#marginsBottom").value) || 0);
+ const previewHeight = Math.max(previewElement.scrollHeight / 96 - (parseFloat(document.querySelector("#marginsTop").value) || 0) - (parseFloat(document.querySelector("#marginsBottom").value) || 0), getPageSizeDimensions().height);
ipcRenderer.send("${Constants.SIYUAN_EXPORT_PDF}", buildExportConfig(actionElement.querySelector("#landscape").checked ? {
height: getPageSizeDimensions().height,
width: previewHeight,