An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 设置访问授权码后无法导出 PDF https://github.com/siyuan-note/siyuan/issues/5959
Liang Ding8e62f4c6258a
diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.tsindex 5c536934e6..f065b95ba5 100644--- a/app/src/protyle/export/index.ts+++ b/app/src/protyle/export/index.ts@@ -2,7 +2,7 @@ import {hideMessage, showMessage} from "../../dialog/message";import {Constants} from "../../constants";/// #if !BROWSERimport {OpenDialogReturnValue} from "electron";-import {BrowserWindow, dialog} from "@electron/remote";+import {BrowserWindow, dialog, app} from "@electron/remote";import * as fs from "fs";import * as path from "path";import {afterExport} from "./util";@@ -86,6 +86,8 @@ const renderPDF = (id: string) => {webSecurity: false,},});+ window.siyuan.printWin.webContents.userAgent = 'SiYuan/' + app.getVersion() + ' https://b3log.org/siyuan Electron'+let pdfWidth = "";if (localData.pageSize === "A3") {if (localData.landscape) {