Skip to content

RiverHeart/Powershell-Barcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Powershell-Barcodes

Barcode Creation using Powershell

Supported Barcodes

  • Code 128 (Length Optimization WIP)

Status
Work in progress. Use at your own risk. The code is short though, so fully understanding what it does before using it should be relatively easy.

Description

Need to create a barcode? Need a reference implementation to convert into your language of choice? Hopefully you can find it here.

This library relies on barcode fonts. Producing barcode images is currently beyond the scope of this repo but something that may be added in the future.

With a font such as Libre Barcode 39 or Libre Barcode 39 Text, this is super easy, barely an inconvenience. All you need is to enclose your text with asterisks to mark the beginning and end of the barcode. What you lack is information density. Barcodes are longer than they otherwise could be.

Barcode128 can produce shorter barcodes but is a bit more complicated. There are 3 code sets (A, B, C) each of which has their own start value. In addition, a checksum needs computed for the values included. Barcode 128C, in particular, can be used to efficiently encode long strings of digits which requires additional computation. And you can even use multiple codesets within the same barcode. Crazy stuff.

Usage

Run the text you wish to convert into a barcode against Get-Code128String. The resulting text can be rendered in barcode form using a barcode font such as Libre Barcode.

Google Font Preview Links:

Kudos

A big thanks to the creator of Libre Barcode!

Reading Material

https://en.wikipedia.org/wiki/Code_128

About

Barcode Creation using Powershell

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published