Change save dir of generated pdfs

This commit is contained in:
Skylar Grant 2024-09-12 15:32:29 -04:00
parent 25dbbfc088
commit 5f1e3b1215
1 changed files with 2 additions and 2 deletions

View File

@ -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]);