mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🔊 Add logging for Unable to export the large PDF file https://github.com/siyuan-note/siyuan/issues/10982
This commit is contained in:
parent
44226fe79d
commit
64d02559f6
2 changed files with 6 additions and 1 deletions
|
|
@ -773,7 +773,11 @@ app.whenReady().then(() => {
|
||||||
return systemPreferences.askForMediaAccess("microphone");
|
return systemPreferences.askForMediaAccess("microphone");
|
||||||
}
|
}
|
||||||
if (data.cmd === "printToPDF") {
|
if (data.cmd === "printToPDF") {
|
||||||
return getWindowByContentId(data.webContentsId).webContents.printToPDF(data.pdfOptions);
|
try {
|
||||||
|
return getWindowByContentId(data.webContentsId).webContents.printToPDF(data.pdfOptions);
|
||||||
|
} catch (e) {
|
||||||
|
writeLog(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (data.cmd === "siyuan-open-file") {
|
if (data.cmd === "siyuan-open-file") {
|
||||||
let hasMatch = false;
|
let hasMatch = false;
|
||||||
|
|
|
||||||
|
|
@ -334,6 +334,7 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
showMessage("Export PDF failed: " + e, 0, "error", msgId);
|
showMessage("Export PDF failed: " + e, 0, "error", msgId);
|
||||||
ipcRenderer.send(Constants.SIYUAN_CMD, {cmd: "destroy", webContentsId: ipcData.webContentsId});
|
ipcRenderer.send(Constants.SIYUAN_CMD, {cmd: "destroy", webContentsId: ipcData.webContentsId});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue