generate barcode in node.js

Barcodes are used to visually represent the data in the form of graphical objects. Different types of barcodes are used in various cases, such as Code128, QR code, Aztech, Pdf127, and etc. In this article, you will learn how to implement barcode generation features in your web applications. Particularly, the article will cover how to generate barcodes in Node.js applications.

Node.js Barcode Generator API

In order to generate barcodes, we will use Aspose.BarCode for Node.js via Java. It is a feature-rich API that lets you generate and read popular barcode symbologies from within your Node.js applications. You can either download the API or install it using the following NPM command.

> npm install aspose.barcode

Aspose.BarCode for Node.js via Java supports the following barcode symbologies.

Australia Post EAN8
Aztec Interleaved2of5
BarCode supplement ITF14
BooklandEAN Matrix 2 of 5
Codabar MSI
Code11 Pdf417
Code128 Planet
Code39 Extended Postnet
Code39 Standard PZN (Pharma Zentral Nummer, Pharmazentralnummer barcode)
Code93 Extended QR
Code93 Standard SSCC18
Datamatrix Standard2of5
Deutsche Post Identcode Swiss QR
EAN128 UPCA
EAN13 UPCE
EAN14(SCC14)

Generate a Barcode in Node.js

The following are the steps to generate a barcode in Node.js applications.

The following code sample shows how to generate a barcode image in Node.js.

Barcode

generate barcode node.js

Generate a QR Code in Node.js

Aspose.BarCode for Node.js via Java also allows you to generate two-dimensional barcodes such as QR codes. The following are the steps to generate a QR code in Node.js.

The following code sample shows how to generate a QR code in Node.js.

QR Code

generate QR node.js

Customize Appearance of a Barcode

You can also customize the appearance of a barcode by changing the forecolor, back color, font, border, resolution, etc. The following are the steps to customize the appearance of a barcode.

The following code sample shows how to customize a barcode in Node.js.

Barcode

customize barcode

Get a Free API License

In order to use the API without evaluation limitations, you can get a free temporary license.

Conclusion

In this article, you have learned how to generate a barcode in Node.js applications. Also, you have seen how to customize the appearance of the barcodes using different options. Furthermore, you can explore more about the API using its documentation. In addition, you can share your queries with us via our forum.

See Also