Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.BarCode for Node.js via Java is a cross-platform product that runs on any operating system (Windows, Linux, macOS, Solaris) where both Node.js and Java are installed.
It supports various JDK distributions, including but not limited to:
You can install the product in two main ways:
The recommended way is to install the package from npm:
Aspose.BarCode for Node.js on npm
npm install aspose.barcode
or specific version
npm i aspose.barcode@25.6.0
The library will be installed to node_modules.
If you do not want to use npm to install the package, you can download Aspose.BarCode for Node.js via Java as a ZIP archive from the
official Aspose website.
doc — API documentation
license — End User License Agreement and third-party licenses
libs — Java JAR file and supporting files
examples — code examples
readme.txt — general instructions
Copy the extracted folder (for example, libs or barcode-lib) into your project directory.
You can rename it if you wish (for example, to barcode-lib).
Example project structure:
your-project/
├── barcode-lib/
│ ├── index.js
│ └── lib/
│ ├── AsposeBarcode.js
│ ├── ...other .js files
│ └── aspose-barcode-nodejs-25.5.jar
├── node_modules/
├── package.json
├── index.js
└── ...
package.json if it is not already there:"dependencies": {
"java": "^0.12.1"
}
Then run:
npm install
const { AsposeBarcode } = require('./barcode-lib');
const { BarcodeGenerator, EncodeTypes, BarCodeImageFormat, BarCodeReader, License } = AsposeBarcode;
const license = new License();
license.setLicense('Aspose.BarCode.NodeJsviaJava.lic');
const generator = new BarcodeGenerator(EncodeTypes.CODE_11, "12345678");
const base64Image = generator.generateBarCodeImage(BarCodeImageFormat.PNG);
const reader = new BarCodeReader(base64Image);
const resultsArray = reader.readBarCodes();
const barCodeResult = resultsArray[0];
console.log("codeText", barCodeResult.getCodeText());
console.log("codeType", barCodeResult.getCodeTypeName());
process.exit(0);
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.