Skip to content

Commit

Permalink
fix printer
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl committed Sep 30, 2024
1 parent 9ee7910 commit 7db54bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/server/src/utilities/printer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { tmpdir, platform } from 'os';
import * as print from 'pdf-to-printer';
import * as PDFDocument from 'pdfkit';
import { createWriteStream, readFileSync } from 'fs';
import { getSimbridgeDir } from 'apps/server/src/utilities/pathUtil';
import { getExecutablePath, getSimbridgeDir } from 'apps/server/src/utilities/pathUtil';
import printerConfig from '../config/printer.config';

@Injectable()
Expand Down Expand Up @@ -66,7 +66,7 @@ export class PrinterService {
doc.end();
print.print(pdfPath, {
printer: foundPrinter.name,
sumatraPdfPath: `${getSimbridgeDir()}/resources/SumatraPDF.exe`,
sumatraPdfPath: `${getExecutablePath()}/resources/SumatraPDF.exe`,
});
}
} catch (error) {
Expand Down

0 comments on commit 7db54bd

Please sign in to comment.