npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aspose.barcode

v24.11.0

Published

barcode generation and recognition component

Downloads

274

Readme

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
  • Prerequisites Should be installed and added to PATH : Python 3.x, Node.js, Oracle JDK (1.7 and higher).
  • Install aspose.barcode library: 'npm i aspose.barcode'
  • You can go to examples directory and launch examples.
  1. Launch npm i aspose.barcode in root of your project.
  2. Add statements const barcode_ = require("aspose.barcode"); const aspose_barcode = barcode_.AsposeBarcode; to your script. For detailed information see script examples in the folder 'examples' (ExamplesAssist.js, BarcodeGeneratorExamples.js etc)`
How to generate and recognize the BarCode image
const fs = require("fs");
const barcode_ = require("aspose.barcode");
const aspose_barcode = barcode_.AsposeBarcode
let BarcodeGenerator = aspose_barcode.BarcodeGenerator;
let EncodeTypes = aspose_barcode.EncodeTypes;
let BarCodeReader = aspose_barcode.BarCodeReader;

function generateAndRead()
{
    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);
    reader.readBarCodes().forEach(function(result, i, results)
    {
       console.log("Recognized barcode code text: " + result.getCodeText(false) + "\n");
        console.log("Recognized barcode code type: " + result.getCodeTypeName() + "\n");
    });
}
How to set quality settings and read BarCode image
 let file_name = "code11.png";
 let full_path = this.subfolder + file_name;
 let reader = new BarCodeReader(full_path, null, null);
 reader.setQualitySettings(QualitySettings.getHighPerformance());
 reader.getQualitySettings().setAllowMedianSmoothing(true);
 reader.getQualitySettings().setMedianSmoothingWindowSize(5);
 reader.readBarCodes().forEach(function (result, i, results)
 {
    console.log(result.getCodeText());
    console.log(result.getCodeTypeName());
 });
How to define BarCode type and generate BarCode image
const barcode_ = require("aspose.barcode");
const aspose_barcode = barcode_.AsposeBarcode
let BarcodeGenerator = aspose_barcode.BarcodeGenerator;
let EncodeTypes = aspose_barcode.EncodeTypes;

let encode_type = EncodeTypes.CODE_128;
let generator = new BarcodeGenerator(encode_type, null);
generator.setCodeText("123ABC");
generator.save(this.subfolder + "howToGenerateBarcodeImage.png", "PNG");

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