Custom Kube Printer Driver

/

KUBE II LOTTERY is a high performance thermal printer suitable for applications in the gaming, lottery and betting sector. High quality printing of logos and. Download the latest drivers for your Custom KUBE 80mm (200dpi) to keep your Computer up-to-date.

30 Mar 2009CPOL

Introduction

In this article, I will show how it’s possible to use an XML file as a Command file to drive a custom Kube printer. In detail, the goal of the project is to use the printer with native commands (escape sequences) for best performance, but creating the layout through a simple XML file instead of using a complex fixed code. The printer can be driven both by USB and RS232 ports. Via RS232, it’s also possible to read the printer and the paper status.

Background

In the Kube manual, you can see all the supported commands. My library doesn’t support all commands yet, but it maps the major ones. Also, it’s simpler to implement the missed commands. Bitmaps can be printed, and inside the library, there are conversion functions. Custom char definition is supported as well. Strings are printed by converting special characters (international chars) in the correct escape sequence. The conversion is defined in an XML file, so you can add the missed chars – currently, I’ve defined some Spain and Italian chars only.

Using the Code

The library can be used inside every project. It’s necessary to design the classes for data interchange (you can see some examples below) in which the only rule is to use the IList interface for encapsulating a sequence of data. This is possible because classes are read by the print engine using Reflection.

To print data using one of the defined templates is simple, but you need to write XML for defining every template, of course. To apply a sequence of commands to an IList, use a loop command. You can see an example below:

When you have the class for the data and the template for the layout, you can print the ticket with this piece of code:

Custom Kube Printer Driver Download

Driver

Points of Interest

The process to print is composed of three parts:

Driver
  1. The first one uses the XML file to create a list of CommandPrinter objects.
  2. The second one decodes every CommandPrinter in a byte sequence.
  3. A buffer with all the byte sequence is sent to the printer.

CommandPrinter derivate classes define every Kube command with the possible parameters. An image can also be printed. The ImageRasterHelper converts the image in the correct byte sequence for the printer.

Custom Kube Printer

Support for international characters is defined in another XML file (a class streaming XML file) that you can expand to handle all international characters supported by the printer.

Free cd cover printer. It’s also possible to define labels in different languages. The language used inside the template is defined with language attributes in the first line, while the XML file that defines labels can be expanded for more labels as you like.

Printer Driver Epson