Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 595 Bytes

README.md

File metadata and controls

31 lines (22 loc) · 595 Bytes

Barcode

GoDoc

Introduction

This is a barcode generation package for Golang

Example

This is a simple example of creating a barcode in Code 128-A encoding format.

package main

import (
    "github.com/ppsleep/barcode"
    "github.com/ppsleep/barcode/code128"
    "image/png"
    "os"
)

func main() {
    code, _ := code128.A("CODE 128-A")
    r := barcode.Encode(code, 2, 50)
    file, _ := os.Create("128A.png")
    defer file.Close()
    png.Encode(file, r)
}