Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
67
rated 0 times [  72] [ 5]  / answers: 1 / hits: 17399  / 13 Years ago, mon, february 13, 2012, 12:00:00

I am developing a web-based POS. Unfortunately, POS must print through a thermal receipt printer (TM-T88IV, Epson). The web application is based on Django. Is there any idea on how the system could automatically print a receipt whenever a user clicks a control in the web application?


I was thinking of creating other services in python for that purpose, but that would defeat the purpose of having a web application, where all you need is a browser, without any extra installation.


The printer is connected to the client by the way, and the printing should be "silently" triggered, which means that there is no need for human intervention. Once the transaction is finalized, the printing should starts.


Any suggestion is welcomed!


More From » css

 Answers
30

I see two ways to accomplish it:



First method - Configure your browser



Notes



Good solution if you have one printer for every client (because you can use the default printer only). Keep in mind that you can remove your print server (useful for very resource limited devices) making a script that the browser should automatically execute for open your file. You can use something like this:



#!/bin/bash
printer=/dev/usb/lp0
encoding_needed=true #false

if $encoding_needed; then
iconv -c -t 437 $1 > $printer
else
cat $1 > $printer
fi


Firefox





Keep in mind that there are other extensions for making kiosks, for example:





Chrome



You can start it with those options: --kiosk --kiosk-printing



Internet Explorer



For kiosk mode see: http://support.microsoft.com/kb/154780



Second method - Server handles every printer



Notes



Good solution if:




  1. You have more clients than printers (few money or faulty printers)

  2. More printers than clients (different printers or paper colors for different needs)

  3. Clients that can't print directly (PDA/smartphones)

  4. You want to know the printer status



How to do




  1. Connect printers (to the clients and/or to the server)

  2. Share printers connected to clients over the network

  3. Manage every printer from your Django server


[#87506] Saturday, February 11, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
briannar

Total Points: 354
Total Questions: 103
Total Answers: 101

Location: Japan
Member since Sat, Jun 6, 2020
4 Years ago
briannar questions
Tue, Aug 31, 21, 00:00, 3 Years ago
Sat, Jun 26, 21, 00:00, 3 Years ago
Sat, Jun 20, 20, 00:00, 4 Years ago
Tue, Apr 7, 20, 00:00, 4 Years ago
;