diff --git a/server/pdf.js b/server/pdf.js index a342437e..558acc22 100644 --- a/server/pdf.js +++ b/server/pdf.js @@ -46,7 +46,11 @@ async function getPDFForElectron(doctype, name, destination, htmlContent) { const printPromise = new Promise(resolve => { printWindow.webContents.on('did-finish-load', () => { - printWindow.webContents.printToPDF({}, (error, data) => { + printWindow.webContents.printToPDF({ + marginsType: 1, // no margin + pageSize: 'A4', + printBackground: true + }, (error, data) => { if (error) throw error printWindow.close(); fs.writeFile(filepath, data, (error) => { diff --git a/test.db-journal b/test.db-journal deleted file mode 100644 index aba14275..00000000 Binary files a/test.db-journal and /dev/null differ