|
@@ -1,15 +1,16 @@
|
|
|
export function printCurrentPage() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
let remote = window.nodeRequire("electron").remote;
|
|
|
-
|
|
|
+ document.querySelector("#app").style = "display: none";
|
|
|
remote.getCurrentWindow().webContents.printToPDF(
|
|
|
{
|
|
|
marginsType: 1,
|
|
|
pageSize: "A4",
|
|
|
- printBackground: true,
|
|
|
+ printBackground: false,
|
|
|
landscape: false,
|
|
|
},
|
|
|
(error, data) => {
|
|
|
+ document.querySelector("#app").style = "display: block";
|
|
|
if (error) {
|
|
|
reject(error);
|
|
|
}
|