• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

aztec/H19-Feb-2019-

codabar/H19-Feb-2019-

code128/H19-Feb-2019-

code39/H19-Feb-2019-

code93/H19-Feb-2019-

datamatrix/H19-Feb-2019-

ean/H19-Feb-2019-

pdf417/H19-Feb-2019-

qr/H19-Feb-2019-

twooffive/H19-Feb-2019-

utils/H19-Feb-2019-

.gitignoreH A D19-Feb-20199

LICENSEH A D19-Feb-20191.1 KiB

README.mdH A D19-Feb-20191.1 KiB

barcode.goH A D19-Feb-20191,014

go.modH A D19-Feb-201936

scaledbarcode.goH A D19-Feb-20192.8 KiB

README.md

1[![Join the chat at https://gitter.im/golang-barcode/Lobby](https://badges.gitter.im/golang-barcode/Lobby.svg)](https://gitter.im/golang-barcode/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
3## Introduction ##
4
5This is a package for GO which can be used to create different types of barcodes.
6
7## Supported Barcode Types ##
8* 2 of 5
9* Aztec Code
10* Codabar
11* Code 128
12* Code 39
13* Code 93
14* Datamatrix
15* EAN 13
16* EAN 8
17* PDF 417
18* QR Code
19
20## Example ##
21
22This is a simple example on how to create a QR-Code and write it to a png-file
23```go
24package main
25
26import (
27	"image/png"
28	"os"
29
30	"github.com/boombuler/barcode"
31	"github.com/boombuler/barcode/qr"
32)
33
34func main() {
35	// Create the barcode
36	qrCode, _ := qr.Encode("Hello World", qr.M, qr.Auto)
37
38	// Scale the barcode to 200x200 pixels
39	qrCode, _ = barcode.Scale(qrCode, 200, 200)
40
41	// create the output file
42	file, _ := os.Create("qrcode.png")
43	defer file.Close()
44
45	// encode the barcode as png
46	png.Encode(file, qrCode)
47}
48```
49
50## Documentation ##
51See [GoDoc](https://godoc.org/github.com/boombuler/barcode)
52
53To create a barcode use the Encode function from one of the subpackages.
54