aspose.barcode
Advanced tools
Comparing version 21.12.5 to 22.1.5
@@ -10,3 +10,3 @@ 'use strict' | ||
{ | ||
java.classpath.push(__dirname + "/aspose-barcode-nodejs-21.12.jar"); | ||
java.classpath.push(__dirname + "/aspose-barcode-nodejs-22.1.jar"); | ||
} | ||
@@ -13,0 +13,0 @@ pushJar(); |
const java = require('java'); | ||
const fs = require("fs"); | ||
function isPath(image) | ||
{ | ||
if (image.length < 256 && image.includes("/") || image.includes("\\")) | ||
{ | ||
if (fs.existsSync(image)) | ||
{ | ||
return true; | ||
} | ||
throw new joint.BarcodeException("Path " + image + " does not exist"); | ||
} | ||
return false; | ||
} | ||
function convertResourceToBase64String(resource) | ||
{ | ||
let is_path_to_image = false; | ||
is_path_to_image = fs.existsSync(resource); | ||
if (is_path_to_image) | ||
{ | ||
return fs.readFileSync(resource).toString('base64'); | ||
} | ||
else | ||
{ | ||
return resource; | ||
} | ||
} | ||
class BaseJavaClass | ||
@@ -409,3 +438,3 @@ { | ||
module.exports = { | ||
BaseJavaClass, BarcodeException, Rectangle, Point, License, BuildVersionInfo | ||
BaseJavaClass, BarcodeException, Rectangle, Point, License, BuildVersionInfo, isPath, convertResourceToBase64String | ||
}; |
{ | ||
"name": "aspose.barcode", | ||
"version": "21.12.5", | ||
"version": "22.1.5", | ||
"description": "barcode generation and recognition component", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12554850
10060