mirror of
https://github.com/frappe/books.git
synced 2024-12-24 03:45:35 +00:00
Default PDF Settings (#105)
* Fix values not updating in single doctypes * Add print settings and comment isNew function * Add print settings * add no margin comment
This commit is contained in:
parent
7a0356f414
commit
8bdce07a00
@ -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) => {
|
||||
|
BIN
test.db-journal
BIN
test.db-journal
Binary file not shown.
Loading…
Reference in New Issue
Block a user