Documentation
¶
Overview ¶
Package epson implements the protocol used by most thermal printer, also commonly referred to as ESC or POS commands.
Index ¶
- func CutPaper(buf io.Writer)
- func Image(buf io.Writer, image image.Image)
- func ImageESCStar(buf io.Writer, img image.Image)
- func InitPrinter(buf io.Writer)
- func LineBreak(buf io.Writer)
- func OpenCashDrawer1(buf io.Writer)
- func OpenCashDrawer1WithPulse(buf io.Writer, t1, t2 byte)
- func OpenCashDrawer2(buf io.Writer)
- func OpenCashDrawer2WithPulse(buf io.Writer, t1, t2 byte)
- func SetStandardMode(buf io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Image ¶
Image converts a image to the printer "GS v 0: Print raster image" command and adds it to the printer buffer.
func ImageESCStar ¶ added in v1.0.1
ImageESCStar prints using ESC * in 24-dot mode.
func InitPrinter ¶
InitPrinter will re-init the printer and aborts any outstanding commands.
func OpenCashDrawer1 ¶ added in v1.0.1
OpenCashDrawer1 opens cash drawer connected to pin 2. Uses standard pulse duration (t1=2, t2=5 which is ~100ms on, ~250ms off).
func OpenCashDrawer1WithPulse ¶ added in v1.0.1
OpenCashDrawer1WithPulse opens cash drawer 1 with custom pulse duration. t1: ON time (0-255, each unit is approximately 50ms) t2: OFF time (0-255, each unit is approximately 50ms)
func OpenCashDrawer2 ¶ added in v1.0.1
OpenCashDrawer2 opens cash drawer connected to pin 5. Uses standard pulse duration (t1=2, t2=5 which is ~100ms on, ~250ms off).
func OpenCashDrawer2WithPulse ¶ added in v1.0.1
OpenCashDrawer2WithPulse opens cash drawer 2 with custom pulse duration. t1: ON time (0-255, each unit is approximately 50ms) t2: OFF time (0-255, each unit is approximately 50ms)
func SetStandardMode ¶
SetStandardMode will set the printer into the standard mode. In this mode the printer will instantly print all data it receives.
Types ¶
This section is empty.