From 5f1e3b12157571499f5064aa8a36aa0765a6d9ac Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Thu, 12 Sep 2024 15:32:29 -0400 Subject: [PATCH] Change save dir of generated pdfs --- mccs-it/thermal/modules/Thermal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mccs-it/thermal/modules/Thermal.js b/mccs-it/thermal/modules/Thermal.js index 84dba3a..10bf80f 100644 --- a/mccs-it/thermal/modules/Thermal.js +++ b/mccs-it/thermal/modules/Thermal.js @@ -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]);