Skip to content

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

:art: pdf

Vanessa87fd6265f4af
diff --git a/app/electron/main.js b/app/electron/main.js
index 9a0278fc57..544b8d9182 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -730,11 +730,7 @@ app.whenReady().then(() => {
return systemPreferences.askForMediaAccess("microphone");
}
if (data.cmd === "printToPDF") {
- const wnd = getWindowByContentId(event.sender.id);
- if (!wnd) {
- return;
- }
- return wnd.webContents.printToPDF(data.pdfOptions);
+ return getWindowByContentId(data.webContentsId).webContents.printToPDF(data.pdfOptions);
}
if (data.cmd === "siyuan-open-file") {
let hasMatch = false;