I am trying to setup silent printing using the 'IntranetSlipPrinterJS' in Koha 3.10. Documentation found here: http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silentl... My javascript looks like this: function printThenClose() { try { jsPrintSetup.setPrinter('TSP143-(STR_T-001)'); jsPrintSetup.clearSilentPrint(); jsPrintSetup.setOption('printSilent', 1); jsPrintSetup.setOption('headerStrLeft',); jsPrintSetup.setOption('headerStrCenter',); jsPrintSetup.setOption('headerStrRight',); jsPrintSetup.setOption('footerStrLeft',); jsPrintSetup.setOption('footerStrCenter',); jsPrintSetup.setOption('footerStrRight',); jsPrintSetup.print(); } catch(err) { //Default printing if jsPrint-setup is not available window.print(); window.close(); } } Using Firefox 19 on Ubuntu 12.04. It brings up the receipt window but that's it. I've tried commenting out the setprinter line ...no change. JSprint addon is set to allow any site access. Tried other permissions to no avail. Does anyone have complete instructions for getting this to work? Thanks! -- Chad Roseburg Automation Dept. North Central Regional Library
Hi Chad, The code is not correctly displayed in the Wiki, it does not show ''. That's why I wrote: "Please refer to 'view source' or 'edit' to correctly display the JavaScript code". To fix your code, pls. change the following lines to: jsPrintSetup.setOption('headerStrLeft',''); jsPrintSetup.setOption('headerStrCenter',''); jsPrintSetup.setOption('headerStrRight',''); jsPrintSetup.setOption('footerStrLeft',''); jsPrintSetup.setOption('footerStrCenter',''); jsPrintSetup.setOption('footerStrRight',''); Regards Marc Véron www.veron.ch Am 29.03.2013 21:30, schrieb Chad Roseburg:
I am trying to setup silent printing using the 'IntranetSlipPrinterJS' in Koha 3.10.
Documentation found here: http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silentl...
My javascript looks like this: function printThenClose() { try { jsPrintSetup.setPrinter('TSP143-(STR_T-001)'); jsPrintSetup.clearSilentPrint(); jsPrintSetup.setOption('printSilent', 1);
jsPrintSetup.setOption('headerStrLeft',); jsPrintSetup.setOption('headerStrCenter',); jsPrintSetup.setOption('headerStrRight',); jsPrintSetup.setOption('footerStrLeft',); jsPrintSetup.setOption('footerStrCenter',); jsPrintSetup.setOption('footerStrRight',); jsPrintSetup.print(); } catch(err) { //Default printing if jsPrint-setup is not available window.print(); window.close(); } }
Using Firefox 19 on Ubuntu 12.04.
It brings up the receipt window but that's it. I've tried commenting out the setprinter line ...no change. JSprint addon is set to allow any site access. Tried other permissions to no avail. Does anyone have complete instructions for getting this to work?
Thanks!
Greetings,
http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silentl...
The code is not correctly displayed in the Wiki, it does not show ''.
I tweaked the page, since it was not displaying correctly. It should now display the two single quotes correctly. I also removed the comment saying to view source. Hope this helps avoid this problem in the future. The RichEditor is your friend -- unless you like typing 4 single quotes. ;) And to reiterate, the code displayed should look like: jsPrintSetup.setOption('headerStrLeft',''); jsPrintSetup.setOption('headerStrCenter',''); jsPrintSetup.setOption('headerStrRight',''); jsPrintSetup.setOption('footerStrLeft',''); jsPrintSetup.setOption('footerStrCenter',''); jsPrintSetup.setOption('footerStrRight',''); GPML, Mark Tompsett -----Original Message----- From: Marc Véron Sent: Saturday, March 30, 2013 3:01 AM To: koha Subject: Re: [Koha] jsprint setup - Hi Chad, That's why I wrote: "Please refer to 'view source' or 'edit' to correctly display the JavaScript code". To fix your code, pls. change the following lines to: jsPrintSetup.setOption('headerStrLeft',''); jsPrintSetup.setOption('headerStrCenter',''); jsPrintSetup.setOption('headerStrRight',''); jsPrintSetup.setOption('footerStrLeft',''); jsPrintSetup.setOption('footerStrCenter',''); jsPrintSetup.setOption('footerStrRight',''); Regards Marc Véron www.veron.ch Am 29.03.2013 21:30, schrieb Chad Roseburg:
I am trying to setup silent printing using the 'IntranetSlipPrinterJS' in Koha 3.10.
Documentation found here: http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silentl...
My javascript looks like this: function printThenClose() { try { jsPrintSetup.setPrinter('TSP143-(STR_T-001)'); jsPrintSetup.clearSilentPrint(); jsPrintSetup.setOption('printSilent', 1);
jsPrintSetup.setOption('headerStrLeft',); jsPrintSetup.setOption('headerStrCenter',); jsPrintSetup.setOption('headerStrRight',); jsPrintSetup.setOption('footerStrLeft',); jsPrintSetup.setOption('footerStrCenter',); jsPrintSetup.setOption('footerStrRight',); jsPrintSetup.print(); } catch(err) { //Default printing if jsPrint-setup is not available window.print(); window.close(); } }
Using Firefox 19 on Ubuntu 12.04.
It brings up the receipt window but that's it. I've tried commenting out the setprinter line ...no change. JSprint addon is set to allow any site access. Tried other permissions to no avail. Does anyone have complete instructions for getting this to work?
Thanks!
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Thanks for tweaking, Mark. Code looks nice now. Marc Véron Am 30.03.2013 14:48, schrieb Mark Tompsett:
Greetings,
http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silentl...
The code is not correctly displayed in the Wiki, it does not show ''.
I tweaked the page, since it was not displaying correctly. It should now display the two single quotes correctly. I also removed the comment saying to view source. Hope this helps avoid this problem in the future. The RichEditor is your friend -- unless you like typing 4 single quotes. ;)
And to reiterate, the code displayed should look like: jsPrintSetup.setOption('headerStrLeft',''); jsPrintSetup.setOption('headerStrCenter',''); jsPrintSetup.setOption('headerStrRight',''); jsPrintSetup.setOption('footerStrLeft',''); jsPrintSetup.setOption('footerStrCenter',''); jsPrintSetup.setOption('footerStrRight','');
GPML, Mark Tompsett
participants (3)
-
Chad Roseburg -
Marc Véron -
Mark Tompsett