escpos

package
v0.0.0-...-bc9612b Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	io.WriteCloser

	Initialize() error
	SelectPrintMode(mode PrintMode) error
	SelectLineSpacing(spacing uint8) error
	SelectJustification(justify Justification) error
	PrintAndFeed(lines uint8) error
}

func NewDriver

func NewDriver(w io.WriteCloser) Driver

func OpenDriver

func OpenDriver(path string) (Driver, error)

type Justification

type Justification uint8
const (
	JustifyLeft   Justification = 0
	JustifyCenter Justification = 1
	JustifyRight  Justification = 2
)

type PrintMode

type PrintMode uint8
const (
	AlternateFontMode PrintMode = 1
	EmphasisMode      PrintMode = 1 << 3
	DoubleHeightMode  PrintMode = 1 << 4
	DoubleWidthMode   PrintMode = 1 << 5
	UnderlineMode     PrintMode = 1 << 7
)

Jump to

Keyboard shortcuts

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