Sen descrición

boombuler a59cf9ed0f Added Code 93 support %!s(int64=8) %!d(string=hai) anos
aztec b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
codabar b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
code128 4112921d73 code128: Test Datalogic programming barcodes. %!s(int64=8) %!d(string=hai) anos
code39 ca2b51849b added test for code 3 of 9 %!s(int64=9) %!d(string=hai) anos
code93 a59cf9ed0f Added Code 93 support %!s(int64=8) %!d(string=hai) anos
datamatrix b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
ean b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
qr b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
twooffive b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
utils b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
LICENSE 03fa651512 added license %!s(int64=11) %!d(string=hai) anos
README.md a59cf9ed0f Added Code 93 support %!s(int64=8) %!d(string=hai) anos
barcode.go b066487b3e moved checksum function to its own interface %!s(int64=9) %!d(string=hai) anos
scaledbarcode.go c0b5aafe4c Fix typo %!s(int64=9) %!d(string=hai) anos

README.md

Introduction

This is a package for GO which can be used to create different types of barcodes.

Supported Barcode Types

  • Aztec Code
  • Codabar
  • Code 128
  • Code 93
  • Code 39
  • EAN 8
  • EAN 13
  • Datamatrix
  • QR Codes
  • 2 of 5

Example

This is a simple example on how to create a QR-Code and write it to a png-file

package main

import (
	"image/png"
	"os"

	"github.com/boombuler/barcode"
	"github.com/boombuler/barcode/qr"
)

func main() {
	// Create the barcode
	qrCode, _ := qr.Encode("Hello World", qr.M, qr.Auto)

	// Scale the barcode to 200x200 pixels
	qrCode, _ = barcode.Scale(qrCode, 200, 200)

	// create the output file
	file, _ := os.Create("qrcode.png")
	defer file.Close()

	// encode the barcode as png
	png.Encode(file, qrCode)
}

Documentation

See GoDoc

To create a barcode use the Encode function from one of the subpackages.