mirror of
https://github.com/frappe/books.git
synced 2024-12-25 20:11:15 +00:00
fix: Set printPath using app.getAppPath()
This commit is contained in:
parent
8f02928cee
commit
d027871707
@ -47,7 +47,14 @@ async function getPDFForElectron(doctype, name, destination, htmlContent) {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
url = `http://localhost:${process.env.PORT}/static/print.html`;
|
||||
} else {
|
||||
url = `file://${__dirname}/static/print.html`;
|
||||
let printPath = path.join(
|
||||
remote.app.getAppPath(),
|
||||
'dist',
|
||||
'electron',
|
||||
'static',
|
||||
'print.html'
|
||||
);
|
||||
url = `file://${printPath}`;
|
||||
}
|
||||
|
||||
printWindow.loadURL(url);
|
||||
|
Loading…
Reference in New Issue
Block a user