Skip to content

barcode-bakery/barcode-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Barcode Bakery is an umbrella of many barcode symbologies. We have been implementing the barcode specifications for decades and we are confident in our generated barcodes.

The TypeScript library includes:

  • React: An easy tag can be included anywhere in a React application to generate any type of barcodes on the client without a roundtrip to the server.
  • NodeJS: Generating barcodes on the server side and serving them as stream or saving them as images using a canvas library.

We support multiple types of symbologies:

  • 1D
    • Codabar
    • Code 11
    • Code 39
    • Code 39 Extended
    • Code 93
    • Code 128
    • EAN-8
    • EAN-13
    • Interleaved 2 of 5
    • ISBN
    • MSI Plessey
    • Other Code
    • Standard 2 of 5
    • UPC-A
    • UPC-E
    • UPC-E Extension 2
    • UPC-E Extension 5
  • Aztec
  • Databar Expanded
  • DataMatrix
  • MaxiCode
  • PDF417
  • QRCode

We also offer other programming languages such as PHP and .NET.

Learn more about it on our website.

Installation

We are currently using a monorepo to handle all the packages. They are all pushed to NPM. Navigate to the correct code above or click on the language you would like to use to continue:

Documentation

You can find an extensive documentation on the website.

Check out the Developer's Guide page for a quick overview.

Examples

We have several examples on the website. Here is the first one to get you started:

React

import { BakeryCode128 } from '@barcode-bakery/barcode-react/1d';

export default function Home() {
  return <BakeryCode128 text="a123" thickness={30} scale={1} />;
}

This example will display the barcode Code 128 on the page.

NodeJS

import { BCGDrawing, createSurface, save } from '@barcode-bakery/barcode-nodejs';
import { BCGcode128 } from '@barcode-bakery/barcode-nodejs/1d';

const code = new BCGcode128();
code.setThickness(30);
code.parse('a123');

const drawing = new BCGDrawing(createSurface);
drawing.draw(code);

save(drawing, 'image.png', BCGDrawing.ImageFormat.Png);

This example will save the barcode Code 128 in a file.

License

Barcode Bakery for TypeScript is CC BY-ND 4.0. Creative Commons Attribution-NoDerivatives 4.0 International.

Which means, you are allowed to use it in your projects, commercial or non-commercial, for free. However, you cannot change the copyrights or change the code and sell our library to others.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published