aspose-barcode-cloud-node 22.1.0 → 22.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/aspose-barcode-cloud-node)
|
|
6
6
|
|
|
7
7
|
+ API version: 3.0
|
|
8
|
-
+ Package version: 22.
|
|
8
|
+
+ Package version: 22.8.0
|
|
9
9
|
|
|
10
10
|
## Demo applications
|
|
11
11
|
|
|
12
|
-
[Scan QR](https://products.aspose.app/barcode/scanqr) | [Generate Barcode](https://products.aspose.app/barcode/generate) | [Recognize Barcode](https://products.aspose.app/barcode/recognize)
|
|
13
|
-
:---: | :---: | :---:
|
|
14
|
-
[](https://products.aspose.app/barcode/scanqr) | [](https://products.aspose.app/barcode/generate) | [](https://products.aspose.app/barcode/recognize)
|
|
12
|
+
[Scan QR](https://products.aspose.app/barcode/scanqr) | [Generate Barcode](https://products.aspose.app/barcode/generate) | [Recognize Barcode](https://products.aspose.app/barcode/recognize)
|
|
13
|
+
:---: | :---: | :---:
|
|
14
|
+
[](https://products.aspose.app/barcode/scanqr) | [](https://products.aspose.app/barcode/generate) | [](https://products.aspose.app/barcode/recognize)
|
|
15
|
+
[**Generate Wi-Fi QR**](https://products.aspose.app/barcode/wifi-qr) | [**Embed Barcode**](https://products.aspose.app/barcode/embed) | [**Scan Barcode**](https://products.aspose.app/barcode/scan)
|
|
16
|
+
[](https://products.aspose.app/barcode/wifi-qr) | [](https://products.aspose.app/barcode/embed) | [](https://products.aspose.app/barcode/scan)
|
|
15
17
|
|
|
16
18
|
[Aspose.BarCode for Cloud](https://products.aspose.cloud/barcode/) 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.
|
|
17
19
|
|
|
@@ -33,7 +35,7 @@ npm install aspose-barcode-cloud-node --save
|
|
|
33
35
|
|
|
34
36
|
### Sample usage
|
|
35
37
|
|
|
36
|
-
The examples below show how your application have to generate
|
|
38
|
+
The examples below show how your application have to generate QR code and save it on local storage:
|
|
37
39
|
|
|
38
40
|
```js
|
|
39
41
|
const fs = require('fs');
|
|
@@ -41,16 +43,18 @@ const Barcode = require('aspose-barcode-cloud-node');
|
|
|
41
43
|
|
|
42
44
|
const config = new Barcode.Configuration(
|
|
43
45
|
'Client Id from https://dashboard.aspose.cloud/applications',
|
|
44
|
-
'Client Secret from https://dashboard.aspose.cloud/applications'
|
|
46
|
+
'Client Secret from https://dashboard.aspose.cloud/applications',
|
|
47
|
+
null,
|
|
48
|
+
process.env['TEST_CONFIGURATION_ACCESS_TOKEN']
|
|
45
49
|
);
|
|
46
50
|
|
|
47
51
|
async function generateBarcode(api) {
|
|
48
52
|
const request = new Barcode.GetBarcodeGenerateRequest(
|
|
49
|
-
Barcode.EncodeBarcodeType.
|
|
53
|
+
Barcode.EncodeBarcodeType.QR,
|
|
50
54
|
'Aspose.BarCode for Cloud Sample');
|
|
51
55
|
const oneBarcode = await api.getBarcodeGenerate(request);
|
|
52
56
|
|
|
53
|
-
const fileName = '
|
|
57
|
+
const fileName = 'QR.png'
|
|
54
58
|
fs.writeFileSync(fileName, oneBarcode.body);
|
|
55
59
|
|
|
56
60
|
return fileName;
|
|
@@ -59,7 +63,9 @@ async function generateBarcode(api) {
|
|
|
59
63
|
async function recognizeBarcode(api, fileName) {
|
|
60
64
|
const request = new Barcode.PostBarcodeRecognizeFromUrlOrContentRequest();
|
|
61
65
|
request.image = fs.readFileSync(fileName);
|
|
66
|
+
request.type = Barcode.DecodeBarcodeType.QR;
|
|
62
67
|
request.preset = Barcode.PresetType.HighPerformance;
|
|
68
|
+
request.fastScanOnly = true;
|
|
63
69
|
|
|
64
70
|
const result = await api.postBarcodeRecognizeFromUrlOrContent(request);
|
|
65
71
|
|