Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
aztec/ | H | 19-Feb-2019 | - | 1,194 | 977 | |
codabar/ | H | 19-Feb-2019 | - | 83 | 71 | |
code128/ | H | 19-Feb-2019 | - | 480 | 436 | |
code39/ | H | 19-Feb-2019 | - | 185 | 162 | |
code93/ | H | 19-Feb-2019 | - | 172 | 145 | |
datamatrix/ | H | 19-Feb-2019 | - | 593 | 491 | |
ean/ | H | 19-Feb-2019 | - | 235 | 212 | |
pdf417/ | H | 19-Feb-2019 | - | 1,290 | 1,128 | |
qr/ | H | 19-Feb-2019 | - | 1,801 | 1,583 | |
twooffive/ | H | 19-Feb-2019 | - | 185 | 159 | |
utils/ | H | 19-Feb-2019 | - | 498 | 403 | |
.gitignore | H A D | 19-Feb-2019 | 9 | 2 | 1 | |
LICENSE | H A D | 19-Feb-2019 | 1.1 KiB | 22 | 17 | |
README.md | H A D | 19-Feb-2019 | 1.1 KiB | 54 | 40 | |
barcode.go | H A D | 19-Feb-2019 | 1,014 | 43 | 29 | |
go.mod | H A D | 19-Feb-2019 | 36 | 2 | 1 | |
scaledbarcode.go | H A D | 19-Feb-2019 | 2.8 KiB | 135 | 109 |
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