This commit is contained in:
Skylar Grant 2024-09-12 13:45:18 -04:00
parent 665f1fe563
commit 8581027340
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ app.post('/print-credentials', async (req, res) => {
const infoString = Thermal.generateInfo.credentials(username, studentId);
// Generate the PDF, saved to disk
Thermal.generatePdf(infoString).then(res => {
Thermal.generatePdf(infoString).then(resolve => {
// Print the document
Thermal.print().then(res => {
Thermal.print().then(resolve => {
res.send('PDF sent to printer successfully.');
}).catch(e => {
console.error('Failed to start printing process:', e);