zebrash
Library for rendering ZPL (Zebra Programming Language) files as raster images
Usage:
file, err := os.ReadFile("./testdata/label.zpl")
if err != nil {
t.Fatal(err)
}
parser := zebrash.NewParser()
res, err := parser.Parse(file)
if err != nil {
t.Fatal(err)
}
var buff bytes.Buffer
drawer := zebrash.NewDrawer()
err = drawer.DrawLabelAsPng(res[0], &buff, drawers.DrawerOptions{})
if err != nil {
t.Fatal(err)
}
err = os.WriteFile("./testdata/label.png", buff.Bytes(), 0744)
if err != nil {
t.Fatal(err)
}