Vanessa 2023-10-08 12:08:11 +08:00
parent 3127ff1e52
commit c1e0b4ff60
3 changed files with 91 additions and 95 deletions

View file

@ -461,15 +461,14 @@ 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}", currentWindowId)
ipcRenderer.send("${Constants.SIYUAN_EXPORT_CLOSE}")
});
actionElement.querySelector('.b3-button--text').addEventListener('click', () => {
const {ipcRenderer} = require("electron");
ipcRenderer.send("${Constants.SIYUAN_EXPORT_PDF}", {
id: currentWindowId,
title: "${window.siyuan.languages.export} PDF",
pdfOptions:{
printBackground: true,
landscape: actionElement.querySelector("#landscape").checked,