Giter Site home page Giter Site logo

mugli / png2escpos Goto Github PK

View Code? Open in Web Editor NEW
33.0 1.0 6.0 382 KB

Quickly convert PNG files to ESC/POS format, for printing on Epson thermal point-of-sale printers. Written in Go/Golang

License: MIT License

Go 95.62% Shell 4.38%
escpos escpos-printer epson png printer pos-printers pos-printer-driver format-converter converter go golang

png2escpos's Introduction

png2escpos

Quickly convert PNG files to ESC/POS format, for printing on Epson thermal point-of-sale printers.

This utility removes transparency from image, makes it grayscale and then encodes in ESC/POS format.

Written in pure Go/Golang.


Installation

Download binary from release tab.


Usage

./png2escpos <filename.png>:
	Binary output in ESC/POS format will be written directly to stdout.

	You can pipe this output directly into an Epson compatible thermal printer with:
		Linux:	./png2escpos <file.png> > /dev/usb/lp0
		macOS:	./png2escpos <file.png> | lpr -P NAME_OF_PRINTER

		Or, if you have a network printer listening at 192.168.1.100:9100
			you can use socat to forward from stdin to network like this:

			Linux:	./png2escpos <file.png> | socat STDIN TCP4:192.168.1.100:9100
			macOS:	./png2escpos <file.png> | socat STDIN TCP4:192.168.1.100:9100

			(you may have to install socat on macOS with brew install socat first)

Other commands:

	help, --help, -h:
		Shows this message

Acknowledgement

NielsLeenheer/EscPosEncoder - For the rasterization and ESC/POS encoding in JavaScript.

twg/png2escpos - For CLI usage pattern.


License

MIT

png2escpos's People

Contributors

mugli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

png2escpos's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.