Documentation ¶
Overview ¶
Package ql is a Linux driver for Brother QL-series printers.
Index ¶
Constants ¶
View Source
const ( StatusTypeReplyToRequest StatusType = 0x00 StatusTypePrintingCompleted = 0x01 StatusTypeErrorOccurred = 0x02 StatusTypeTurnedOff = 0x04 StatusTypeNotification = 0x05 StatusTypePhaseChange = 0x06 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaInfo ¶
type MediaInfo struct { // Note that these are approximates, many pins within the margins will work. SideMarginPins int PrintAreaPins int // If non-zero, length of the die-cut label print area in 300dpi pins. PrintAreaLength int }
func GetMediaInfo ¶
type Printer ¶
type Printer struct { File *os.File Manufacturer string Model string LastStatus *Status MediaInfo *MediaInfo // StatusNotify is called whenever we receive a status packet. StatusNotify func(*Status) }
func Open ¶
Open finds and initializes the first USB printer found supporting the appropriate protocol. Returns nil if no printer could be found.
func (*Printer) Initialize ¶
Initialize initializes the printer for further operations.
func (*Printer) UpdateStatus ¶
Request new status information from the printer. The printer must be in an appropriate mode, i.e. on-line and not currently printing.
type Status ¶
type Status [32]byte
Status is a decoder for the status packed returned by the printer.
func (*Status) MediaLengthMM ¶
func (*Status) MediaWidthMM ¶
func (*Status) Phase ¶
func (s *Status) Phase() StatusPhase
func (*Status) Type ¶
func (s *Status) Type() StatusType
type StatusPhase ¶
type StatusPhase byte
const ( StatusPhaseReceiving StatusPhase = 0x00 StatusPhasePrinting = 0x01 )
type StatusType ¶
type StatusType byte
Click to show internal directories.
Click to hide internal directories.