POS System Review: The Simplest, The Lightest and The Cheapest

Anyone can find cheapest Point of Sale (POS) hardware environment recently in this world (including barcode printer, barcode scanner, CPU & display monitor)? Well, I can find it for US$ 493 with all brand new devices! No kidding but here's the truth. All things has passed for future consideration, including lower electricity cost, easier to use barcoding on your store around and simple custom-made software for checkout purposed.

This is without receipts printer since this POS focused on stocking intention. So, receipt coupon for customer is infrequently or even never used, hereby changed with manual hand written.

And, here's the secret:


Zotac ZBOX ID41
WTH is this? Weird branded CPU name born in (nearly) Hong Kong with core business on mini-ITX and mini-PC since… 2006. That's why I choose it apart from it best mixed hardware combination.


This mini PC is thinner but wider than Mac Mini G4.


See link below for detail information:

http://www.zotac.com/index.php?page=shop.product_details&flypage=flypage_images-SRW.tpl&product_id=335&category_id=171&option=com_virtuemart&Itemid=100295&lang=un

Interesting?

Epson LabelWorks LW-400
This is an evolution for Epson to providing a low cost label printer. See the spoiler below:

http://www.epson.com/cgi-bin/Store/jsp/Product.do?sku=C51CB70010

The LW-400 is the minimum series to support barcode printing prior to LW-900.


The packing size slightly larger than Mac Mini G4.


A full qwerty printer at notebook size but more a little thicker. Very handy and ergonomic when hands on and feels light weight too. Just like seeing a BlackBerry with monster size :D


There're also 12mm black-on-white LC sample tape cassette including in the box, with easy way to setting-up on the printer. First press lid button to open the back cap and pull it.


Place the tape in proper way (green box) with outer ribbon attached on small slot (red circle).


Next, close the back cap slowly until it show as normal.


This series operated with dual mode; 6AA battery and power cable. You'll find a power cable included in the box. Make a power connection and press power button.


To switch to barcode printing, press ALT+barcode key as shown as picture above. Then pick one from several built-in barcode font available and specify the size. Sorry, can't tell you what else barcode font built-in included since I'm not an Epson salesman :)


Type-in some digits of numerical code to test. If you like to print copies, press copier button (red circle) several times until it displayed how much copy you want to print out. Ended with print button (green box) to start to print.


This LW-400 series also equipped with manual cutter. So, after print stopped, just press green button in right side to cut-off the paper. Simple and easy.

CipherLab 1070
Finally found a low cost scanner with fairly well-known brand name: CipherLab.


See below spoiler:

http://www.cipherlab.com/catalog.asp?CatID=8&SubcatID=10&ProdID=354

Not too worry, it can read Epson barcode print out result (by using EAN-13 small 5cm size :)


Conclusion
Building recently POS (hardware & software) system much easier than couple years ago. From above specification, there's no need to create an add-in module to print the barcode from application.


It's separate anyway. So it takes shorter time to developing the software. What you need is to mix and match everything. That's it! Thank's for reading and see you on next article...

Labels: , , , , , , , , ,

  Post a Comment

Make DHTML more Dynamic with Java Applet

In a rarely cases, DHTML is not enough only with the use of Javascript. Some specific purpose in a web page just couldn't be supplied with it. Basically, Javascript has several limitations, especially in a page that need to retrieve information related to local machine resources.

Let say - for example - how to list printer names (on web based application) that installed locally in local machine? Without ActiveX object available in Windows & Internet Explorer browser, there is no option to gain with it. So, what's so special with "Dynamic" terms in DHTML if it stuck with specific OS's or browser? Please pay attention, Java Applet is the only key for the answer (multi-platform, multi-OS & multi-browser - theoretically :).

Well, I'm not a Java expert that order you to moved to become a Java programmer since my self is not included to the statement. Anyway - on this chance - I just tried to tells that "there's many ways to Rome", there's lots of things we can do to make our web page function properly accepted, but there's only a way to list printer name installed in local machine. Just spread up your creativity, make a R&D & your done! This article dedicated to peoples who follows Method 8 Framework & founder of jZebra (Hi, Tres. Looks like I need to modified the source :).

Before it started, imagine first: "I'm a new to Java programming, how can I make an applet?" and "Okay, I made it, so how can I embedded it to the page?" or "How can Java Applet communication with Javascript?"

As sequentially within the story, I'll share the answer. First of it, provide Netbeans & JDK installation file & configure it on your machine. Then, create an Applet project from Netbeans. On the example, I named both the project, class & java code with printName.

package printname;
import javax.print.PrintService;
import java.awt.print.PrinterJob;
import java.applet.Applet;
public class printName extends Applet {

public static void main(String[] args) {
String printerName;
printerName = menuList();
// just make a call to print out its value
System.out.println(printerName);
}

public static String menuList() {
// Lookup for the available print services.
PrintService[] printServices = PrinterJob.lookupPrintServices();

// Iterates the print services to a variable
String printerName = "";
for (PrintService printService : printServices) {
String name = printService.getName();
printerName = printerName + "#" + name;
}
return printerName;
}
}


Save & run above compiled code, you'll see that the applet will return a line of string of local printer name which separated with "#" character. Build & clean the code to make the JAR file.

Now, copy/upload the JAR file to the same folder where the HTML laid. Return to HTML editor & create a param tag to embed the JAR file. Also, create a dropdown select since we're gonna list that printer name from the applet to that object.

<html>
...
<script language="JavaScript">
function addOption(selectbox,text,value) {
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}

function removeAllOptions(selectbox) {
var i;
for(i=selectbox.options.length-1;i>=0;i--) {
selectbox.remove(i);
}
}

function fPrintName() {
var afPrintName = document.printName.menuList();
removeAllOptions(document.fInput.printerName);
addOption(document.fInput.printerName,'-- Pilih Printer --','');
if (afPrintName.length!=0) {
var namaPrinter = afPrintName.split('#');
n = namaPrinter.length;
for (var i=1; i<n; i++) {
addOption(document.fInput.printerName,namaPrinter[i],namaPrinter[i]);
}
}
}
</script>
<body onload="fPrintName();">
<applet name="printName" code="printname.printName.class" archive="printName.jar" width="1" height="1"></applet>
<form name="fInput">
<select name="printerName"></select>
</form></body>
...
</html>


Done, upload to the web server directory. Now, check your current printer from the control panel. There's 2 printers listed on my system.



Open your browser & locate to the html page. For the first usage, a standard permission window may appear since it need to confirm the security in the client side.




Finally, here come the result. The printer name now listed to the page.



CONCLUSION
The use of Java Applet on this case helping user to choose a selected printer name they want to print out with. It's useful to combine with jZebra since it only works with printer name that specified before. The Javascript core function located on fPrintName(). This function (first line -- document.printName.menuList()) purposed to communicate with the applet embedded in param tag, also to parse the string value returned from the applet. With 4kb of JAR executable size, this is so light-weight applet.

Labels: , , , ,

  Post a Comment

RAW Printing from Web Based Application

This is what I called a revolutionary for the web based application to handle RAW printing. Somehow, I found this Java applet named jZebra & it worked successfully as same as 16-bit console printing operation - the objective is prohibiting paper to rolled up one sheet full. Different with other extension “add-on” (eg: php_printer module on PHP) which is executed on server, jZebra operated on client side – since it Java based applet, you know it’ll depends on existing JRE package in each client. But - nevertheless - printing in a small paper (eg: receipt or bill) from web based application is not a problem anymore.

A couple years ago, I was thinking about to create a small win32 application purposed to take job RAW printing on LAN on here and there (with AssignPrn function available on Delphi), it’s done to print locally but unfortunately failed to handle network printing session – especially on non Windows machine (Linux ~ with CrossOver “limitation” capabilities). Anyway, you can read the online documentation of jZebra or try the sample directly provided over Google code page where it published for free.

On current article, I’d like to share about my experiment on exploring jZebra, including a short review and a bit modification of HTML page so that jZebra will have more flexible to use. Before continue reading this & decide to use it, I suggest you to read first of jZebra manual whether it suitable to your need or not.

At first, I try to create an HTML page, embed the applet – minor modification from the example - & store it on local Apache web server. The picture below explains what I’ve done above:



Image above shows jZebra initialization process. Once the applet executed, each & every browser will need a confirmation window to run Java applet. It signed by small loading logo rolling where the embed applet placed on a page.



When printer doesn’t exist, the applet will return fail code says that the printer is not yet ready. I switch back to Printer & Fax Control Panel & found that there’s no printer configured, while I still use FinePrint screen printing application as my default printer on my netbook.



Any printing process regarding to unsuccessful printer communication will raise failed information just like below picture.



For the experiment, I then rename the “FinePrint” printer name to “zebra



And … voila, the applet status says it ready.



Press print button & below picture display what’s happened on Windows printer status. You can see that the document name is “Java Printing”.



The printer on my experiment particularly used is LX-300 with USB plug cable. At the same time I press the Print button, the print will printing on paper directly & it stop to the end of string. It has exact behavior like DOS printing as I told before.



The above experiment I created from small modification of jZebra example. Note that information status as seen on above picture is based on AJAX, I decide to modified the source & use AJAX rather than manual common button (Detect Printer) for ease-of-use & compact source only. Below source define small part of index.html where I attach JavaScript main function:

...
<script type="text/javascript" src="js/jzebra.js"></script>
<body onLoad="detectPrinter()">

<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> <td colspan="2" bgcolor="#000000"><span id="printerStatusBar">Loading...</span></td></tr>
<tr> <td width="47%"><form name="form1" method="post" >
String untuk dicetak<br>
<textarea name="struk" cols="50" rows="7" id="struk"></textarea>
<br><input name="button" type=button onClick="printStruk(form1.struk.value)" value="Test Cetak">
<input name="button2" type=button onClick="print64()" value="Test Cetak (Base64)">
<input type="reset" name="Reset" value="Reset"></form></td>
<td width="53%">
<applet name="jZebra" code="jzebra.RawPrintApplet.class" archive="js/jzebra.jar" width="100" height="100">
<param name="printer" value="zebra">
<param name="sleep" value="200"></applet></td></tr></table>

While here below is the core of JavaScript function:

function detectPrinter()
{
var applet = document.jZebra;
if (applet != null)
{
applet.findPrinter("zebra");
while (!applet.isDoneFinding())
{
// Wait
}
var ps = applet.getPrintService();
if (ps == null) var info="Printer belum siap";
else var info="Printer \"" + ps.getName() + "\" siap";
}
else
var info="Java Runtime belum siap!";
document.getElementById("printerStatusBar").innerHTML=info;
window.setTimeout('detectPrinter()',5000);
}

function printStruk(str)
{
var applet = document.jZebra;
if (applet != null)
{
// Plain Text
str=returnEnter(str);
applet.append(str);
// Send to the printer
applet.print();
while (!applet.isDonePrinting())
{
// Wait
}
var e = applet.getException();
if (e == null) var info="Printed Successfully";
else var info="Error: " + e.getLocalizedMessage();
}
else
{
var info="Printer belum siap";
}
document.getElementById("printerStatusBar").innerHTML=info;
}

function returnEnter(dataStr)
{
return dataStr.replace(/(\r\n|\r|\n)/g, "\n");
}




From the above picture, the example page now contains a textarea input. This purposed for user to print what they enter on it. So that this prototype will more flexible to use, since each of HTML page only embedding the JavaScript core function when custom specified page need the RAW printing function. Have a good try & share your comment below.

Labels: , , , , ,

  Post a Comment

FC4

  Post a Comment