Skip to content

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

:bug: Restore mobile print page margins https://github.com/siyuan-note/siyuan/issues/19972

Danielb428117f1906
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index 48f67a68fe..38bc8566ee 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -1128,7 +1128,8 @@ export const onExport = async (data: IWebSocketData, filePath: string, servePath
const isInMobile = isInMobileApp();
const mobileHtml = isInMobile ? {
js: exportOption.type === "pdf" ? "" : `document.body.style.minWidth = "${getScreenWidth()}px";`,
- css: `@page { size: A4; margin: 10mm 0 10mm 0; background-color: var(--b3-theme-background); }
+ css: `@page { size: A4; margin: 10mm; background-color: var(--b3-theme-background); }
+@media print { body { margin: 0; } }
.protyle-wysiwyg {padding: 0; margin: 0;}`
} : {js: "", css: ""};
const html = `<!DOCTYPE html>