Socket
Socket
Sign inDemoInstall

aspose.barcode

Package Overview
Dependencies
0
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aspose.barcode

barcode generation and recognition component


Version published
Weekly downloads
235
decreased by-27.47%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Aspose.Barcode for Node.js via Java is implemented using Node.js and Java through nodejs-java bridge. It allows developers to quickly and easily add barcode generation and recognition functionality to their Node.js applications.

General Barcode Features

Specify different kinds of symbologies.
Barcode Code text (data to be encoded to barcode image) can be set
and its appearance related properties like font, back color, fore
color, alignment and location
(hide, above, below) etc. can also be modified.
Checksum is supported.
Barcode Caption and its font, back color, fore color, alignment and
location (hide, above, below) can be managed.

Bar height of the barcode images can be customized. X-dimension, Y-dimension (for 2D BarCodes) are also supported. Code128 encoding is exceptionally optimized. Wide to Narrow Ratio can be achieved for supported symbologies. DataMatrix barcode with X12, EDIFACT and Base 256 encoding Able to recognize and generate a lot of different Barcode types

Barcode Recognition Features

BarcodeReader reads most common 1D, 2D barcodes anywhere at any angle from an image. Specify an area in the image to scan the barcode Get region information for the barcodes recognized in the image

Barcode Imaging Features

Manipulate the barcode image borders, border color, style, margins, width, etc. Barcode image color, back color, and bar color can be modified. Rotate barcode images to any degree. High-quality barcode images. Anti-Aliasing for barcode images. Barcode image margins can be managed. Customized resolution. Size in inches and millimeters. Auto Sizing of barcode images. Create barcode images in any desired image format like BMP, JPEG, GIF, PNG

How to generate and recognize the BarCode image

const assist = require("assist.js");
const barcodeJarPath = "aspose-barcode-nodejs-20.6.jar";
let license = new assist.License();
java.classpath.push(barcodeJarPath);
let generator = new generation.BarcodeGenerator(EncodeTypes.CODE_128, "12367891011");
let file_path = "image.png";
generator.save(file_path, "PNG");
let image_data_base64 = fs.readFileSync(file_path).toString('base64');
let reader = new recognition.BarcodeReader(image_data_base64, null, DecodeType.ALL_SUPPORTED_TYPES);
if (reader.read())
 {
    console.log("Recognized barcode code text: " + reader.getCodeText(false) + "\n");
    console.log("Recognized barcode code type: " + reader.getCodeTypeName() + "\n");
 }
  reader.close();

How to set quality settings and read BarCode using Node.js

let full_path = "path/to/image.png";
let reader = new recognition.BarcodeReader(full_path, null, DecodeType.ALL_SUPPORTED_TYPES);
reader.setQualitySettings(recognition.QualitySettings.getHighPerformance());
reader.getQualitySettings().setAllowMedianSmoothing(true);
reader.getQualitySettings().setMedianSmoothingWindowSize(5);
 while (reader.read())
 {
    console.log(reader.getCodeText(false));
    console.log(reader.getCodeTypeName());
 }
 reader.close();

How to define BarCode type and generate BarCode image

 let generator = new generation.BarcodeGenerator(EncodeTypes.CODE_128, "12367891011");
 let type_expected = generation.EncodeTypes.CODABAR;
 generator.setBarcodeType(type_expected);
 generator.save("image.png", "PNG");
 let type_actual = generator.getBarcodeType();
 console.log("type_expected = " + type_expected + "\n");
 console.log("type_actual = " + type_actual + "\n");

Product Page | Product Documentation | Blog |API Reference | Source Code Samples | Free Support | Temporary License

Keywords

FAQs

Last updated on 24 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc