Change save dir of generated pdfs
This commit is contained in:
parent
25dbbfc088
commit
5f1e3b1215
@ -62,7 +62,7 @@ module.exports = {
|
||||
generatePdf(infoString) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Define the path for the PDF file
|
||||
const pdfFilePath = path.join(__dirname, 'output.pdf');
|
||||
const pdfFilePath = path.join(__dirname, '../public/output.pdf');
|
||||
|
||||
// Create a new PDF document
|
||||
const doc = new PDFDocument({
|
||||
@ -112,7 +112,7 @@ module.exports = {
|
||||
print() {
|
||||
return new Promise((resolve, reject) => {
|
||||
// Define the path for the PDF file
|
||||
const pdfFilePath = path.join(__dirname, 'output.pdf');
|
||||
const pdfFilePath = path.join(__dirname, '../public/output.pdf');
|
||||
// Start the print command
|
||||
const printer = spawn('lp', ['-d', 'ITThermal', pdfFilePath]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user