Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

aspose.barcode

20.10.0 • Public • Published

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

Aspose.Barcode for Node.js via Java features

General Barcode Features

It's supported the different kinds of symbologies. The BarCode Code text (data which will be encoded to barcode image) should be set. Its appearance-related properties like font, back color, forecolor, alignment, and location (hide, above, below) etc. can also be modified. The checksum is supported. Barcode Caption and its font, back color, fore color, alignment, and location (hide, above, below) can be managed. The 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 Available a lot of different Barcode types for recognizing and generating.

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

Input Image Formats

JPEG PNG BMP GIF

Output Image Formats

JPEG PNG BMP GIF

Supported Barcode Symbologies

Numeric Only Symbologies
  • EAN13
  • EAN8
  • UPCA
  • UPCE
  • ISBN
  • I SMN
  • ISSN
  • Interleaved2of5
  • Standard2of5
  • MSI
  • Code11
  • Codabar
  • Postnet
  • Planet
  • EAN14(SCC14)
  • SSCC18
  • ITF14
  • IATA 2 of 5
  • DatabarOmniDirectional
  • DatabarStackedOmniDirectional
  • DatabarExpandedStacked
  • DatabarStacked
  • DatabarLimited
  • DatabarTruncated
Alpha-Numeric Symbologies
  • GS1Code128
  • Code128
  • Code39 Extended
  • Code39 Standard
  • Code93 Extended
  • Code93 Standard
  • Australia Post
  • Italian Post 25
  • Matrix 2 of 5
  • DatabarExpanded
  • PatchCode
2D Symbologies
  • PDF417
  • DataMatrix
  • Aztec
  • QR
  • MicroQR
  • GS1DataMatrix
  • Code16K
  • CompactPDF417
  • Swiss QR (QR Bill)

Aspose.BarCode supports both encoding and decoding (generation and recognition) for all the listed symbologies.

Install
  1. Launch npm i aspose.barcode in root of your project.
  2. Add statement const barcode = require("aspose.barcode");to your script
How to generate and recognize the BarCode image
const barcode = require("aspose.barcode");
const test_assist = require('./tests_assist');
const fs = require("fs");
let BarcodeGenerator = barcode.AsposeBarcode.Generator.BarcodeGenerator;
let BarcodeReader = barcode.AsposeBarcode.Reader.BarcodeReader;
let EncodeTypes = barcode.AsposeBarcode.Generator.EncodeTypes;
test_assist.set_license();
let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "12367891011");
let file_path = "./resources/generating/setBarcodeType.png";
generator.save(file_path, "PNG");
let image_data_base64 = fs.readFileSync(file_path).toString('base64');
let reader = new 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");
}
How to set quality settings and read BarCode image
const barcode = require("aspose.barcode");
let Reader = barcode.AsposeBarcode.Reader;
let BarcodeReader = barcode.AsposeBarcode.Reader.BarcodeReader;
let full_path = "./resources/recognition/code11.png";
let reader = new BarcodeReader(full_path, null, null);
reader.setQualitySettings(Reader.QualitySettings.getHighPerformance());
reader.getQualitySettings().setAllowMedianSmoothing(true);
reader.getQualitySettings().setMedianSmoothingWindowSize(5);
while (reader.read())
{
    console.log(reader.getCodeText(false));
    console.log("\n");
    console.log(reader.getCodeTypeName());
}
reader.close();
How to define BarCode type and generate BarCode image
const barcode = require("aspose.barcode");
let BarcodeGenerator = barcode.AsposeBarcode.Generator.BarcodeGenerator;
let EncodeTypes = barcode.AsposeBarcode.Generator.EncodeTypes;
let generator = new BarcodeGenerator(EncodeTypes.CODABAR, "12367891011");
let type_expected = EncodeTypes.CODE_128;
generator.setBarcodeType(type_expected);
generator.save("./resources/generating/test4.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

Install

npm i aspose.barcode

DownloadsWeekly Downloads

6

Version

20.10.0

License

End User License Agreement.html

Unpacked Size

12.5 MB

Total Files

24

Last publish

Collaborators

  • avatar