Posts

Showing posts from December, 2015

Print a receipt using a Thermal Printer with C#.NET

Image
I’ve been asked to integrate receipt printing for a software I’ve been developing and the thermal printer my client uses is a very cheap one ordered from eBay for $36.31. There are more developer friendly feature rich printers available but they are very expensive. Who wants to use a expensive printer when the customers will throw away the receipt anyway?

UPDATE: After seeing the feature set of the more expensive Epson printer, I do think that anyone who wishes to have receipts printed, should use a feature rich printer. Some even have color printing capabilities. 



As usual, a quick google search landed me on some Delphi code and most of the code were for those expensive printers. Mostly, Epson. Then I found a link to this page sending-a-bit-image-to-an-epson-tm-t88iii-receipt-printer-using-c-and-escpos which is a dead end now. Luckily, I searched using a piece of code from SFO and it landed me here. printing-utf-8-encoded-text-in-epson-tm-t88iv-thermal-printer

But still, I didn’t quite …

Adding Syntax Highlighting To Blogger

Image
When I was searching for syntax highlighters I found this really cool library highlightjs.org 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. ( https://www.blogger.com/ )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="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/styles/sunburst.min.css"/> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/highlight.min.js"></script>
hit CTRL+F and type "</body>" and hit enter. Add this script above "</body>"
<script&…