Vanessa 2023-01-05 22:30:44 +08:00
parent 15cce2c0a3
commit 7199b5b193
2 changed files with 12 additions and 9 deletions

View file

@ -414,14 +414,15 @@ const renderPDF = (id: string) => {
actionElement.querySelector("#landscape").addEventListener('change', () => {
setPadding();
});
const currentWindowId = ${getCurrentWindow().id};
actionElement.querySelector('.b3-button--cancel').addEventListener('click', () => {
const {ipcRenderer} = require("electron");
ipcRenderer.send("${Constants.SIYUAN_EXPORT_CLOSE}", getCurrentWindow().id)
ipcRenderer.send("${Constants.SIYUAN_EXPORT_CLOSE}", currentWindowId)
});
actionElement.querySelector('.b3-button--text').addEventListener('click', () => {
const {ipcRenderer} = require("electron");
ipcRenderer.send("${Constants.SIYUAN_EXPORT_PDF}", {
id: getCurrentWindow().id,
id: currentWindowId,
pdfOptions:{
printBackground: true,
landscape: actionElement.querySelector("#landscape").checked,