Documentation
¶
Index ¶
- func AlignCenter() []byte
- func AlignLeft() []byte
- func BoldOff() []byte
- func BoldOn() []byte
- func ConvertImageToESCPOS(imagePath string, thresholdPercent int) ([]byte, error)
- func Cut() []byte
- func DoubleHeight() []byte
- func DoubleSize() []byte
- func DoubleWidth() []byte
- func Feed(n int) []byte
- func GenerateDataMatrix(data string) []byte
- func GenerateEAN13(code string) []byte
- func GeneratePDF417(data string) []byte
- func GenerateQRCode(data string) []byte
- func Init() []byte
- func LineFeed() []byte
- func NormalSize() []byte
- func SendToPrinter(data []byte, printerName string) error
- func SolidLine(widthPixels int) []byte
- func UnderlineOff() []byte
- func UnderlineOn() []byte
- func WriteToFile(data []byte, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertImageToESCPOS ¶
ConvertImageToESCPOS converts an image file to ESC/POS bitmap format threshold is a percentage (0-100, higher = more black pixels)
func GenerateDataMatrix ¶
GenerateDataMatrix generates a DataMatrix 2D barcode using ESC/POS commands
func GenerateEAN13 ¶
GenerateEAN13 generates an EAN-13 barcode using native ESC/POS barcode commands The data should be exactly 12 or 13 digits. If 12 digits, the check digit is calculated automatically by the printer.
func GeneratePDF417 ¶
GeneratePDF417 generates a PDF417 2D barcode using ESC/POS commands
func GenerateQRCode ¶
GenerateQRCode generates a QR code and converts it to ESC/POS bitmap format
func LineFeed ¶
func LineFeed() []byte
LineFeed sends a line feed with carriage return (newline + return to column 0)
func SendToPrinter ¶
SendToPrinter sends ESC/POS data to the specified printer via lpr
func WriteToFile ¶ added in v1.1.0
WriteToFile writes raw ESC/POS data to the given path. This is the export path used instead of SendToPrinter when CUPS/lpr is unavailable (e.g. Windows).
Types ¶
This section is empty.