The code is provided under the MIT license please use, edit, change, and share.
Originally by bildr.com
New edits by Ladyada / Adafruit Industries - adding more capabilites! :)
Full tutorial with wiring diagrams, images, etc is available at
http://www.ladyada.net/products/thermalprinter/
Before loading the example code, or even opening the arduino software, place the Thermal folder in your arduino library.
////ARDUINO LIBRARY LOCATION////
On your Mac:: In (home directory)/Documents/Arduino/libraries
On your PC:: My Documents -> Arduino -> libraries
On your Linux box: (home directory)/sketchbook/libraries