barcode

package module
v0.0.0-...-72e133c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 14 Imported by: 0

README

barcode

Golang Barcode Generation Package

This package generates barcodes as SVG / or File. You can Encode the File Outputs with image/* *.Encode(w, f) See example folder.

Supported Barcodes:

  • C39
  • C39+
  • C39E
  • C39E+
  • C93
  • S25
  • S25+
  • I25
  • I25+
  • C128 // auto mode
  • C128A
  • C128B
  • C128C
  • EAN2
  • EAN5
  • EAN8
  • EAN13
  • UPCA
  • UPCE
  • MSI
  • MSI+
  • POSTNET
  • PLANET
  • RMS4CC
  • KIX

Call:

  • code: {string} Your Code
  • variant: {string} one of Supported Barcodes
  • w: {int} barcode with * w multiplier
  • h: {int} height of the barcode in px
  • color: {string} color as CSS compatible string value
  • showCode: {bool} display code under BARCODE
  • inline: {bool} removes XML/SVG headers from output
Returns

SVG as string

GetBarcodeSVG(code, variant, w, h, color, showCode, inline)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBarcodeFile

func GetBarcodeFile(code, variant string, w, h int, color string, showCode bool, inline bool, transparant bool) (*os.File, *image.RGBA)

GetBarcodeFile returns a Barcode as PNG representation

func GetBarcodeSVG

func GetBarcodeSVG(code, variant string, w, h int, color string, showCode bool, inline bool) string

GetBarcodeSVG generates a SVG xml for given code

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL