?
This commit is contained in:
parent
665f1fe563
commit
8581027340
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user