aspose.barcode 25.1.0 → 25.3.1
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.
|
@@ -181,45 +181,6 @@ class BarCodeReaderExamples
|
|
|
181
181
|
console.log("getMacroPdf417SegmentID : " + result.getExtended().getPdf417().getMacroPdf417SegmentID() + "\n");
|
|
182
182
|
console.log('getMacroPdf417SegmentsCount : ' + result.getExtended().getPdf417().getMacroPdf417SegmentsCount() + "\n");
|
|
183
183
|
});
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
howToCustomerInformationInterpretingType1()
|
|
188
|
-
{
|
|
189
|
-
console.log("\n---\nfunction '" + this.howToCustomerInformationInterpretingType1.name + "'\n");
|
|
190
|
-
let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, null);
|
|
191
|
-
generator.setCodeText("59123456781234567");
|
|
192
|
-
generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE);
|
|
193
|
-
generator.getParameters().setAutoSizeMode(AutoSizeMode.NEAREST);
|
|
194
|
-
generator.getParameters().getImageWidth().setPixels(300);
|
|
195
|
-
generator.getParameters().getImageHeight().setPixels(150);
|
|
196
|
-
let image = generator.generateBarCodeImage(aspose_barcode.BarCodeImageFormat.PNG);
|
|
197
|
-
let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
|
|
198
|
-
reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
|
|
199
|
-
reader.readBarCodes().forEach(function (result, i, results)
|
|
200
|
-
{
|
|
201
|
-
console.log("CodeText : " + result.getCodeText());
|
|
202
|
-
console.log("CodeType : " + result.getCodeTypeName());
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
howToCustomerInformationInterpretingType2()
|
|
207
|
-
{
|
|
208
|
-
console.log("\n---\nfunction '" + this.howToCustomerInformationInterpretingType2.name + "'\n");
|
|
209
|
-
let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, null);
|
|
210
|
-
generator.setCodeText("6212345678");
|
|
211
|
-
generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
|
|
212
|
-
generator.getParameters().setAutoSizeMode(AutoSizeMode.INTERPOLATION);
|
|
213
|
-
generator.getParameters().getImageWidth().setPixels(300);
|
|
214
|
-
generator.getParameters().getImageHeight().setPixels(150);
|
|
215
|
-
let image = generator.generateBarCodeImage(aspose_barcode.BarCodeImageFormat.PNG);
|
|
216
|
-
let reader = new BarCodeReader(image, null, DecodeType.AUSTRALIA_POST);
|
|
217
|
-
reader.getBarcodeSettings().getAustraliaPost().setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
|
|
218
|
-
reader.readBarCodes().forEach(function (result, i, results)
|
|
219
|
-
{
|
|
220
|
-
console.log("CodeText : " + result.getCodeText());
|
|
221
|
-
console.log("CodeType : " + result.getCodeTypeName());
|
|
222
|
-
});
|
|
223
184
|
}
|
|
224
185
|
}
|
|
225
186
|
|
|
@@ -235,5 +196,3 @@ barCodeReaderExamples.howToRecognitionCodeAllSupportedTypes();
|
|
|
235
196
|
barCodeReaderExamples.howToRecognitionCodeAllSupportedTypes2();
|
|
236
197
|
barCodeReaderExamples.howToRecognitionSetBarCodeImage();
|
|
237
198
|
barCodeReaderExamples.howToMacroPdf417();
|
|
238
|
-
barCodeReaderExamples.howToCustomerInformationInterpretingType1();
|
|
239
|
-
barCodeReaderExamples.howToCustomerInformationInterpretingType2();
|
package/lib/AsposeBarcode.js
CHANGED
|
@@ -4,7 +4,7 @@ const joint_ = require('./Joint');
|
|
|
4
4
|
const complexbarcode_ = require("./ComplexBarcode");
|
|
5
5
|
const generation_ = require("./Generation");
|
|
6
6
|
const recognition_ = require("./Recognition");
|
|
7
|
-
const jar_name_ = "/aspose-barcode-nodejs-25.
|
|
7
|
+
const jar_name_ = "/aspose-barcode-nodejs-25.3.jar";
|
|
8
8
|
const jar_path_ = __dirname + jar_name_;
|
|
9
9
|
const fs = require("fs");
|
|
10
10
|
|
package/lib/Generation.js
CHANGED
|
@@ -131,14 +131,18 @@ class BarcodeGenerator extends joint.BaseJavaClass
|
|
|
131
131
|
* </p>
|
|
132
132
|
* @param codeText CodeText string | Bytes of codetext
|
|
133
133
|
* @param encoding Applied encoding
|
|
134
|
+
* @param BoM flag indicates insertion of the Encoding byte order mark (BOM). In case, the Encoding requires byte order mark (BOM) insertion: like UTF8,
|
|
135
|
+
* UTF16, UTF32, e.t.c. and flag is set to true, the BOM is added, in case of setting flag to false, the BOM insertion is ignored.
|
|
134
136
|
*/
|
|
135
|
-
setCodeText(codeText, encoding)
|
|
137
|
+
setCodeText(codeText, encoding, BoM)
|
|
136
138
|
{
|
|
137
139
|
if (Array.isArray(codeText)) {
|
|
138
140
|
this.getJavaClass().setCodeBytesSync(Buffer.from(codeText));
|
|
139
141
|
}
|
|
140
|
-
else
|
|
141
|
-
|
|
142
|
+
else
|
|
143
|
+
{
|
|
144
|
+
let adaptedBoMStr = BoM == null ? null : BoM.toString();
|
|
145
|
+
this.getJavaClass().setCodeTextSync(codeText, encoding, adaptedBoMStr);
|
|
142
146
|
}
|
|
143
147
|
}
|
|
144
148
|
|
|
Binary file
|