TSP100 thermal receipt printers on Ubuntu 12.04

From Koha Wiki

Jump to: navigation, search
Home > Documentation
Home > Documentation
Tips & Tricks > Tips & Tricks/Customising Notices and Slips > Tips & Tricks

These instructions are for installing a Star Micronic TSP100 (TSP143LAN) thermal receipt printer on an Ubuntu 12.04 client (using the MATE desktop) for use in Koha.

1. At the command prompt:

sudo apt-get install libcups2-dev libcupsimage2-dev
cd /tmp
wget http://www.starmicronics.com/support/DriverFolder/drvr/starcupsdrv-3.4.0_linux_20121210.tar.gz
tar -xzf starcupsdrv-3.4.0_linux_20121210.tar.gz
cd starcupsdrv-3.4.0_linux/SourceCode
tar -xzf starcupsdrv-src-3.4.0.tar.gz
cd starcupsdrv/
make
sudo make install

Use the add printer applet in System > Administration > Printing to add the printer to the Ubuntu client. The TSP143LAN version of the TSP100 is network enabled. Print out the configuration by turning the printer off, then hold the feed button while turning the printer on. Leave the feed button depressed until the printer configuration is printed. This printout will tell you the printer IP address for use in adding the printer to the Ubuntu client via the add printer applet.

You can also connect to the printer via telnet for additional configuration. The TSP-100 cutter driver works well for us. Additional manufacturer instructions for connecting via telnet can be found here.

Set the TSP100 as the default printer by right-clicking its icon in System > Administration > Printing and selecting Set as default.

2. Install the JS Print Setup add-on in Firefox on the Ubuntu client and add your Koha staff URL to the list of allowed sites in JSPrintSetup preferences (see Screenshot).

3. In Koha Global System Preferences enter the following in the IntranetSlipPrinterJS field (tailor to your needs, this is what our TSP100's use):

function printThenClose() {
try
{
    jsPrintSetup.clearSilentPrint();
    jsPrintSetup.setOption('printSilent', 1);
    //Set Header and footer
    jsPrintSetup.setOption('headerStrLeft', '');
    jsPrintSetup.setOption('headerStrCenter', '');
    jsPrintSetup.setOption('headerStrRight', '');
    jsPrintSetup.setOption('footerStrLeft', '');
    jsPrintSetup.setOption('footerStrCenter', '');
    jsPrintSetup.setOption('footerStrRight', '');
    //Set margins
    jsPrintSetup.setOption('marginTop', 0);
    jsPrintSetup.setOption('marginBottom', 2);
    jsPrintSetup.setOption('marginLeft', 1);
    jsPrintSetup.setOption('marginRight', 1);
    jsPrintSetup.print();
    window.close();
 }
 catch(err)
 {
    //Default printing if jsPrintsetup is not available
    window.print();
    window.close();
 }
 }

4. Edit the slip layout & content in Koha at More > Tools > Notices & Slips.

5. Check an item out. Click Print > Print quick slip to see a receipt. Adjust the receipt layout in IntranetSlipPrinterJS.

Personal tools