Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aspose.barcode

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aspose.barcode

barcode generation and recognition component

  • 21.10.5
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-34.62%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 15 Mar 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc