🔊 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");
|
||||
}
|
||||
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") {
|
||||
let hasMatch = false;
|
||||
|
|
|
@ -334,6 +334,7 @@ ${response.data.replace("%pages", "<span class=totalPages></span>").replace("%pa
|
|||
});
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
showMessage("Export PDF failed: " + e, 0, "error", msgId);
|
||||
ipcRenderer.send(Constants.SIYUAN_CMD, {cmd: "destroy", webContentsId: ipcData.webContentsId});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue