| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repo is an implementation of the ThermalTalk printer protocol in for Android devices. It utilizes FTDI's FT312 USB bridge chip to communicate over RS232 with the printer.
To use this library, add ThermalTalk as a dependency in your Android project. You can then refer to the example code in the 'example' directory for guidance on how to initialize the printer object and send print commands. This library supports both Reliance and Phoenix printers, and which you specify by initializing the appropriate printer class (ReliancePrinter or PhoenixPrinter).
This library enables the use of ESC/POS commands for interacting with the printers. Below is a link to a list of valid ESC/POS commands https://escpos.readthedocs.io/en/latest/commands.html
The ThermalTalk library implements a document-based approach to printing. You can create a Document object and add various elements to it. When you are ready to print, use the PrintDocument(IDocument doc) and FormFeed() commands to send the document to the printer.
Document elements include:
Tools for formatting the document include:
Status commands access information stored within a printer. Use the GetStatus(StatusType statusType) command to retrieve the desired status information. The following status types are supported:
There is a simple logging interface (ILogger) to decouple from any external logging framework.
The library provides a collection of image manipulation algorithms and functions. The primary features are:
All examples require the following import statements:
import com.thermaltalk.Imaging.*;Dithering is the process of converting a high-resolution image into a low-res image without loosing too much fidelity. There are a number of algorithms available and they each provide different balances between quality and performance.
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.test_image);
IDitherer parser = DitherFactory.GetDitherer(Algorithms.JarvisJudiceNinke);
Bitmap ditheredBitmap = parser.GenerateDithered(bitmap);Sometimes we want to manipulate a bitmap in memory or visualize a buffer as a bitmap.
byte[] myBuffer = new byte[] {....}; // Your data
int width = 200;
int height = 200;
Bitmap bitmap = ImageExt.ToBitmap(myBuffer, width, height, Bitmap.Config.ARGB_8888);| Back | FazBrowse Home | New Git URL |