- Code: Select all
if (application.getPrinters().indexOf(printerName) >= 0) {
forms.formName.controller.setPreferredPrinter(printerName);
forms.formName.controller.print(true, false);
}
When I'm connected to the network that have 'pinterName' it works fine.
But when it's not I got the error (only in the consol)
'Kan document niet afdrukken
> javax.print.PrintException: Printer is not accepting job.'
Seems logical to me, because the printer isn't available.
How can I test this printer is available. It tried it already with a try / catch method, but didn't work out.
Thanks on forehand