Showing posts from December, 2015

Print a sales receipt using a thermal printer with C# for POS Application

If you have ever tried to build a POS (Point Of Sales or Point of Services) application, you might have come across the requirement to print a sales receipt like the following. Not just retail stores, but these receipts are produced by banks, hospitality and healthcare too.

Most of the time, such a receipt can be printed using a POS printer, which looks like the one below. The application developer needs to send ESC/POS commands to such a printer  (eg: EPSON) to print the actual receipt. Depending on the manufacturer the capabilities can be vary. However, most of them can handle most of the print commands and print a nicely formatted receipt.

The main advantage of using raw ESC/POS commands for printing is that the printing performance will be faster but this depends on the printer itself.

In this post, I will be using a windows application to send commands to the printer. If you want to do this through a ASP.NET website, the process is a bit more complex and I will try to create anot…

Adding Syntax Highlighting To Blogger

When I was searching for syntax highlighters I found this really cool library and decided to use that instead of piggybacking on SO.

The steps
Don't download hightlight.jsYou need to make changes to your blogger template. Go to your blogger dashboard. ( )Go to Template section on the left side bar.Backup your templateThere is a "Live On Blog" showing a screen of your current blog. under that, there is a "Edit HTML". click that button.hit CTRL+F and type "</b:skin>" and hit enter. Add these lines below "</b:skin>"

<link rel="stylesheet" href=""/> <script src=""></script>
hit CTRL+F and type "</body>" and hit enter. Add this script above "</body>"