Skip to content

oSethoum/epos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epos

A simple go package for printing to ESC/POS printers on windows. It also supports printing Arabic text.

Installation

go get github.com/oSethoum/epos

Example:

package main

import (
	"log"

	"github.com/oSethoum/epos"
)

func main() {
	printer, err := epos.OpenWinPrinter("IDIPOS")
	if err != nil {
		log.Fatalln("Failed to open printer:", err)
	}
	defer printer.Close()

	p := epos.New(printer)
	p.Initialize()
	p.SetAlignment(epos.ALIGN_CENTER)
	p.PrintLarge("POS-WORLD", 2, 2)
	p.PrintText("THANK YOU FOR THE VISIT")
	p.FeedAndCut(5)
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages