-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
Description
What were you trying to do?
Hi,
The problem is that every time a print job is executed, a new Electron process appears in Windows Task Manager and doesn't get terminated after printing. When I perform a large number of prints (e.g., 100) in 5 hours, 100 Electron processes accumulate in Task Manager, consuming all available RAM and eventually causing the application to crash.
How can I fix this?
$print = $request->print;
$defaultPrinter = null;
$printers = System::printers();
foreach ($printers as $printer) {
if ($printer->isDefault) {
$defaultPrinter = $printer;
break;
}
}
if ($defaultPrinter) {
$defaultPrinter->options['pageSize'] = 'AA';
$defaultPrinter->options['silent'] = true;
System::print($print, $defaultPrinter);
echo $print;
} else {
echo 'Default printer not found!';
}
What happened?
How to reproduce the bug
Debug Output
Which operating systems have you seen this occur on?
No response
Notes
No response