Skip to content

ryohajika/ofxThermalPrinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 

Repository files navigation

ofxThermalPrinter

Thermal Printer class for openFrameworks (tested on oF v0.8.0)

Usage

Open port

ofApp.h

ofxThermalPrinter printer;

ofApp.cpp

If you connect a thermal printer to a mac by using FTDI's module, write

printer.setup("dev/tty.xxxxxxx");

and then you can use the printer.

Print sequences

sentences

printer.writeString("string here...");

barcode

printer.printBarcode("barcode text...", type);

(supports: UPC_A, UPC_E, EAN13, EAN8, CODE39, I25, CODEBAR, CODE93, CODE128, CODE11, MSI)

justification

printer.justify('char value');

(Left align: 'L', Center align: 'C', Right align: 'R')

character size

printer.setSize('char value');

('S', 'M', 'L')

feed rows

printer.feed(); // a row will be feeded on a paper printer.feedRows(unsigned char value);

Extras

printer.inverseSwitch(bool enableOrDisable); // invert print pattern

printer.upsideDownSwitch(bool enableOrDisable); // upside down

printer.doubleHeightSwitch(bool enableOrDisable);// enable double height

printer.doubleWidthSwitch(bool enableOrDisable);

printer.boldSwitch(bool enableOrDisable); // enable bold type

printer.underlineOn(unsigned char weight = 1); // set underline

printer.underlineOff(); // disable underline

License

based on a library for Arduino Adafruit_Thermal

original description of the library

This is an Arduino library for the Adafruit Thermal Printer. Pick one up at --> http://www.adafruit.com/products/597

These printers use TTL serial to communicate, 2 pins are required.

Adafruit invests time and resources providing this open source code.

Please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.

MIT license, all text above must be included in any redistribution.

About

The addon which enables openFrameworks-based program to control a thermal receipt printer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages