Documentation ¶
Overview ¶
Package ptouchgo is a driver for PT-710BT/PT700/PT750W
Index ¶
- func CompressImage(data []byte, bytesWidth int) ([]byte, error)
- func LoadPNGImage(r io.Reader, tapeWidth TapeWidth) ([]byte, int, error)
- func LoadRawImage(p image.Image, tapeWidth TapeWidth) ([]byte, int, error)
- type BatteryStatusType
- type Error1Type
- type Error2Type
- type FontColor
- type MediaType
- type Model
- type Notification
- type PhaseNumber
- type PhaseTypeNumber
- type Serial
- func (s Serial) ClearBuffer() error
- func (s Serial) Close() error
- func (s Serial) Initialize() error
- func (s Serial) Print() error
- func (s Serial) PrintAndEject() error
- func (s Serial) ReadStatus() (*Status, error)
- func (s Serial) RequestStatus() error
- func (s Serial) Reset() error
- func (s Serial) SendImage(tiffdata []byte) error
- func (s Serial) SetAutocutPerPagesForPTP750W(pages int) error
- func (s Serial) SetCompressionModeEnabled(enabled bool) error
- func (s Serial) SetExtendedMode(pt750halfcut bool, noChainprint bool, specialTapeDisableCut bool, highDPI bool, ...) error
- func (s Serial) SetFeedAmount(amount int) error
- func (s Serial) SetNotificationMode(on bool) error
- func (s Serial) SetPrintMode(autocut, mirror bool) error
- func (s Serial) SetPrintProperty(rasterLines int) error
- func (s Serial) SetRasterMode() error
- type Status
- type StatusType
- type TapeColor
- type TapeWidth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BatteryStatusType ¶
type BatteryStatusType int
func (BatteryStatusType) String ¶
func (i BatteryStatusType) String() string
type Error1Type ¶
type Error1Type int
type Error2Type ¶
type Error2Type int
func (Error2Type) String ¶
func (i Error2Type) String() string
type Notification ¶
type Notification int
func (Notification) String ¶
func (i Notification) String() string
type PhaseNumber ¶
type PhaseNumber int
func (PhaseNumber) String ¶
func (i PhaseNumber) String() string
type PhaseTypeNumber ¶
type PhaseTypeNumber int
func (PhaseTypeNumber) String ¶
func (i PhaseTypeNumber) String() string
type Serial ¶
type Serial struct { Conn io.ReadWriteCloser TapeWidthMM uint Debug bool }
func Open ¶
Open connection, address should be a device path string like "/dev/rfcomm0", "usb" or "usb://0x7c35" or "tcp://192.168.100.1:9100")
func (Serial) ClearBuffer ¶
ClearBuffer clears current state If you want to stop ongoing data transfer, send ClearBuffer() and Initialize() then printer buffer are cleared and return to data receiving state
func (Serial) PrintAndEject ¶
func (Serial) ReadStatus ¶
ReadStatus reads current status from buffer
func (Serial) RequestStatus ¶
RequestStatus requests current status do not use while printing
func (Serial) SetAutocutPerPagesForPTP750W ¶
func (Serial) SetCompressionModeEnabled ¶
func (Serial) SetExtendedMode ¶
func (Serial) SetFeedAmount ¶
func (Serial) SetNotificationMode ¶
SetNotificationMode set auto status notification mode default: on
func (Serial) SetPrintMode ¶
func (Serial) SetPrintProperty ¶
func (Serial) SetRasterMode ¶
type Status ¶
type Status struct { Type StatusType Model Model Battery BatteryStatusType Error1 Error1Type Error2 Error2Type Mode int StatusType StatusType PhaseType PhaseTypeNumber Phase PhaseNumber Notification Notification MediaType MediaType TapeColor TapeColor TapeLength int TapeWidth TapeWidth FontColor FontColor }
type StatusType ¶
type StatusType int
func (StatusType) String ¶
func (i StatusType) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.