escpos

package module
v0.0.0-...-0a2211a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 4 Imported by: 0

README

escpos

Go simple package to work with thermal printers.

It will help you to generate receipts with basic format.

Based on https://github.com/kenshaw/escpos

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Printer

type Printer struct {
	// contains filtered or unexported fields
}

func New

func New(file io.Writer) (p *Printer)

Create a new printer

func (*Printer) Align

func (p *Printer) Align(align string)

func (*Printer) End

func (p *Printer) End()

End output

func (*Printer) Feed

func (p *Printer) Feed(n int)

Feed the printer

func (*Printer) FontSize

func (p *Printer) FontSize(width, height int)

func (*Printer) Init

func (p *Printer) Init()

Init the printer

func (*Printer) Write

func (p *Printer) Write(data string) (n int, err error)

Write text to the printer

func (*Printer) WriteAccents

func (p *Printer) WriteAccents(data string) (n int, err error)

Write spanish characters (only)

func (*Printer) WriteRaw

func (p *Printer) WriteRaw(data []byte) (n int, err error)

Write raw bytes to printer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL