Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
aspose-barcode-cloud-node
Advanced tools
Scan QR | Generate Barcode | Recognize Barcode | Embed Barcode |
---|---|---|---|
Aspose.BarCode for Cloud is a REST API for Linear, 2D and postal barcode generation and recognition in the cloud. API recognizes and generates barcode images in a variety of formats. Barcode REST API allows to specify barcode image attributes like image width, height, border style and output image format in order to customize the generation process. Developers can also specify the barcode type and text attributes such as text location and font styles in order to suit the application requirements.
This repository contains Aspose.BarCode Cloud SDK for Node.js source code.
To use these SDKs, you will need Client Id and Client Secret which can be looked up at Aspose Cloud Dashboard (free registration in Aspose Cloud is required for this).
The complete source code is available in this repository folder. You can either directly use it in your project via source code or get nmpjs distribution (recommended).
From the command line:
npm install aspose-barcode-cloud-node --save
The examples below show how your application have to generate PDF417 barcode and save it on local storage:
const fs = require('fs');
const Barcode = require('aspose-barcode-cloud-node');
const config = new Barcode.Configuration(
'Client Id from https://dashboard.aspose.cloud/applications',
'Client Secret from https://dashboard.aspose.cloud/applications'
);
async function generateBarcode(api) {
const request = new Barcode.GetBarcodeGenerateRequest(
Barcode.EncodeBarcodeType.Pdf417,
'Aspose.BarCode for Cloud Sample');
const oneBarcode = await api.getBarcodeGenerate(request);
const fileName = 'Pdf417.png'
fs.writeFileSync(fileName, oneBarcode.body);
return fileName;
}
async function recognizeBarcode(api, fileName) {
const request = new Barcode.PostBarcodeRecognizeFromUrlOrContentRequest();
request.image = fs.readFileSync(fileName);
request.preset = Barcode.PresetType.HighPerformance;
const result = await api.postBarcodeRecognizeFromUrlOrContent(request);
return result.body.barcodes;
}
const api = new Barcode.BarcodeApi(config);
console.log('Generating barcode...');
generateBarcode(api)
.then(fileName => {
console.log('Barcode saved to ' + fileName);
console.log('Trying to recognize barcode...');
recognizeBarcode(api, fileName)
.then(barcodes => {
console.log('Recognized barcodes are:');
console.log(JSON.stringify(barcodes, null, 2));
});
})
.catch(err => {
console.error(JSON.stringify(err, null, 2));
process.exitCode = 1;
});
Every method returns a chainable promise.
All Aspose.BarCode for Cloud SDKs, helper scripts and templates are licensed under MIT License.
All URIs are relative to https://api.aspose.cloud/v3.0/
Class | Method | HTTP request | Description |
---|---|---|---|
BarcodeApi | getBarcodeGenerate | GET /barcode/generate | Generate barcode. |
BarcodeApi | getBarcodeRecognize | GET /barcode/{name}/recognize | Recognize barcode from a file on server. |
BarcodeApi | postBarcodeRecognizeFromUrlOrContent | POST /barcode/recognize | Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64. |
BarcodeApi | postGenerateMultiple | POST /barcode/generateMultiple | Generate multiple barcodes and return in response stream |
BarcodeApi | putBarcodeGenerateFile | PUT /barcode/{name}/generate | Generate barcode and save on server (from query params or from file with json or xml content) |
BarcodeApi | putBarcodeRecognizeFromBody | PUT /barcode/{name}/recognize | Recognition of a barcode from file on server with parameters in body. |
BarcodeApi | putGenerateMultiple | PUT /barcode/{name}/generateMultiple | Generate image with multiple barcodes and put new file on server |
FileApi | copyFile | PUT /barcode/storage/file/copy/{srcPath} | Copy file |
FileApi | deleteFile | DELETE /barcode/storage/file/{path} | Delete file |
FileApi | downloadFile | GET /barcode/storage/file/{path} | Download file |
FileApi | moveFile | PUT /barcode/storage/file/move/{srcPath} | Move file |
FileApi | uploadFile | PUT /barcode/storage/file/{path} | Upload file |
FolderApi | copyFolder | PUT /barcode/storage/folder/copy/{srcPath} | Copy folder |
FolderApi | createFolder | PUT /barcode/storage/folder/{path} | Create the folder |
FolderApi | deleteFolder | DELETE /barcode/storage/folder/{path} | Delete folder |
FolderApi | getFilesList | GET /barcode/storage/folder/{path} | Get all files and folders within a folder |
FolderApi | moveFolder | PUT /barcode/storage/folder/move/{srcPath} | Move folder |
StorageApi | getDiscUsage | GET /barcode/storage/disc | Get disc usage |
StorageApi | getFileVersions | GET /barcode/storage/version/{path} | Get file versions |
StorageApi | objectExists | GET /barcode/storage/exist/{path} | Check if file or folder exists |
StorageApi | storageExists | GET /barcode/storage/{storageName}/exist | Check if storage exists |
FAQs
Aspose.BarCode Cloud SDK for Node.js
The npm package aspose-barcode-cloud-node receives a total of 29 weekly downloads. As such, aspose-barcode-cloud-node popularity was classified as not popular.
We found that aspose-barcode-cloud-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.