PNG JPG BMP TIFF SVG
Aspose.BarCode  for Node.js via Java
Standard 2 of 5

อ่านบาร์โค้ด Standard 2 of 5 ด้วย Node.js via Java

อ่าน Standard 2 of 5 (อุตสาหกรรม 2 จาก 5) บาร์โค้ด ใน JavaScript โดยใช้ Aspose.BarCode ฝั่งเซิร์ฟเวอร์สำหรับ Node.js via Java API

How to Read บาร์โค้ด Standard 2 of 5 Using Node.js via Java

หากต้องการจดจำ บาร์โค้ด Standard 2 of 5 ภายในแอปพลิเคชัน Node.js ให้ใช้ Aspose.BarCode สำหรับ Node.js ผ่าน Java ซึ่งเป็นไลบรารีบาร์โค้ดที่มีประสิทธิภาพ หลากหลาย และเป็นมิตรกับผู้ใช้ซึ่งเปิดตัวสำหรับสภาพแวดล้อมที่ใช้ Java คุณสามารถโหลด aspose.barcode สำหรับ Javascript ได้โดยตรงจาก NPM:

Command

  > npm i aspose.barcode

ขั้นตอนในการสแกน บาร์โค้ด Standard 2 of 5 ใน JavaScript

Aspose.BarCode ช่วยให้นักพัฒนาสามารถอ่านบาร์โค้ด บาร์โค้ด Standard 2 of 5 จากสตรีมหรือรูปภาพด้วยโค้ดไม่กี่บรรทัด

  • สร้างวัตถุของคลาส Aspose.BarCode.BarCodeReader
  • ส่งเส้นทางไฟล์ต้นฉบับที่มี บาร์โค้ด Standard 2 of 5 เป็นพารามิเตอร์
  • ตั้งค่าประเภทบาร์โค้ดเป้าหมายใน DecodeType เป็นพารามิเตอร์ที่สอง
  • วนซ้ำผ่านบาร์โค้ดที่ตรวจพบทั้งหมด
  • ดึงข้อความบาร์โค้ดที่ได้โดยใช้คุณสมบัติ CodeText

ความต้องการของระบบ

Aspose API รองรับบนแพลตฟอร์มและระบบปฏิบัติการหลักทั้งหมด ก่อนดำเนินการตามตัวอย่างโค้ดด้านล่าง โปรดตรวจสอบให้แน่ใจว่าระบบของคุณเป็นไปตามข้อกำหนดต่อไปนี้

  • Microsoft Windows, Linux หรือระบบปฏิบัติการใดๆ ที่เข้ากันได้กับ Node.js
  • Node.js และ Node.js/Java Bridge ติดตั้ง
  • Oracle JDK เวอร์ชัน 7 ขึ้นไป
Ready to recognize ตระหนัก วางไฟล์ที่นี่หรือคลิกเพื่อเรียกดู *

* โดยการอัปโหลดไฟล์ของคุณหรือใช้บริการ แสดงว่าคุณยอมรับข้อกำหนดในการให้บริการ ใช้และนโยบายความเป็นส่วนตัว

Code to be executed - JavaScript

    
const barcode_ = require("aspose.barcode");
const aspose_barcode = barcode_.AsposeBarcode

let BarCodeReader = aspose_barcode.BarCodeReader;
let QualitySettings = aspose_barcode.QualitySettings;

let reader = new BarCodeReader("<file name>", null, DecodeType.Standard2of5);
reader.readBarCodes().forEach(function (result, i, results)
{
    console.log(result.getCodeText());
    console.log(result.getCodeTypeName());
});

ผลการรับรู้

Other Supported Barcode Recognition Symbologies

Using Node.js via Java, One can also read barcode of different symbologies including the following.

2D:

Linear:

Postal: