[Koha-bugs] [Bug 7563] Silent print slips using Firefox PlugIn jsPrintSetup and new staff client preference

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Apr 9 10:28:02 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7563

--- Comment #34 from Marc Véron <veron at veron.ch> ---
(In reply to Marc Véron from comment #33)
> Please refer to the following wiki page for setup and usage instructions:
> http://wiki.koha-community.org/wiki/Setting_up_slip_printer_to_print_silently

For the records: Wiki page updated after testing for Koha 16.11 an Firefox
52.02
with new example JavaScript:

-----------------------------
$( window ).load(function() {
 try
 {
    //Try to print using jsPrintSetup Plug-In in Firefox
    //If it is not installed fall back to default printing
    jsPrintSetup.clearSilentPrint();   
    jsPrintSetup.setOption('printSilent', 1);

    //Choose printer using one or more of the following functions
    //jsPrintSetup.getPrintersList...
    jsPrintSetup.setPrinter("PUT HERE YOUR PRINTER NAME");

    //Set Header and footer...
    jsPrintSetup.setOption('headerStrLeft', '');
    jsPrintSetup.setOption('headerStrCenter', '');
    jsPrintSetup.setOption('headerStrRight', '');
    jsPrintSetup.setOption('footerStrLeft', '');
    jsPrintSetup.setOption('footerStrCenter', '');
    jsPrintSetup.setOption('footerStrRight', '');

    jsPrintSetup.print();     
    window.close();
 }
 catch(err)
 {   
    //Default printing if jsPrintsetup is not available
    window.print();
    window.close();
 }
});
-----------------------------

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list