Skip to content

Send raster images to LAN-connected Star Micronics TSP100 / TSP143 receipt printers.

License

Notifications You must be signed in to change notification settings

dalpil/tsp100-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tsp100-print

A small utility for sending raster images to LAN-connected Star Micronics TSP100LAN / TSP143 receipt printers.

The program expects bilevel images, at most 576 pixels wide, and it will complain if you try to feed it anything else.

If no printer is specified, the program will try to autodetect a printer on the network.

The program will do its best to verify that the printjob completed sucessfully, by using the document start/end commands, as well as using the ETB-counter to detect a sucessful print.

See the STAR Graphic Mode Command Specifications, Rev. 2.32 for detailed information on how to talk to these printers.

Usage example

$ tsp100-print <printer-ip> <input.png>

Installation instructions

Clone the repository:

$ git clone https://github.com/dalpil/tsp100-print.git
$ cd tsp100-print

And then install with pip:

$ pip install .

Or with poetry:

$ poetry shell
$ poetry install

The tsp100-print command should now be available.

Usage instructions

Usage: tsp100-print [OPTIONS] PRINTER_IP INPUT

  This is a small utility for sending raster images to Star Micronics TSP100 /
  TSP143 receipt printers.

  The program expects bilevel (black and white) images, at most 576 pixels
  wide. Wider images will be cropped.

Options:
  --cut / --no-cut                Whether or not to cut receipt after printing
                                  [default: cut]
  --density INTEGER RANGE         0 = Highest density, 6 = Lowest density
                                  [default: 3; 0<=x<=6]
  --dither [NONE|FLOYDSTEINBERG]  [default: NONE]
  --margin-top INTEGER            [default: 0]
  --margin-bottom INTEGER         [default: 9]
  --resize-width INTEGER          Resizes input image to the given width while
                                  preserving aspect ratio
  --speed INTEGER RANGE           0 = Fastest, 2 = Slowest  [default: 2;
                                  0<=x<=2]
  --help                          Show this message and exit.

About

Send raster images to LAN-connected Star Micronics TSP100 / TSP143 receipt printers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages