PNG JPG BMP TIFF SVG
Aspose.BarCode  for Node.js via Java
Singapore Post

Node.js via Java ile Singapore Post Etiketleri oluşturun

Sunucu tarafı Aspose.BarCode for Node.js via Java API’sini kullanarak JavaScript içinde Singapore Post barkodu oluşturun.

How to Generate Singapore Post barkodu Using Node.js via Java

Node.js uygulamalarında Singapore Post barkodu barkodları oluşturmak için, Java odaklı platformlar için tasarlanmış gelişmiş, güçlü ve kullanıcı dostu bir barkod API’si olan Java aracılığıyla Aspose.BarCode for Node.js’yi edinin. Javascript için NPM’den aspose.barcode kolayca yükleyebilirsiniz:

Command

  > npm i aspose.barcode

JavaScript Dilinde Singapore Post barkodu Oluşturma Adımları

Aspose.BarCode, geliştiricilerin birkaç satır kodla Singapore Post barkodu görüntüleri oluşturmasını kolaylaştırır.

  • Bir BarCodeGenerator sınıfı örneği oluşturun
  • EncodeTypes parametresi olarak Singapore Post barkodu ayarlayın
  • Kodlanacak metni ikinci parametre olarak tanımlayın
  • Gerekirse barkod boyutlarını ve konumunu belirleyin
  • Oluşturulan barkod görüntüsünü almak için BarCodeGenerator.save yöntemini çağırın

sistem gereksinimleri

Barkod API’lerinin tüm büyük platformlar ve işletim sistemleri tarafından desteklendiğini varsayalım. Aşağıdaki kod örneğini çalıştırmadan önce, lütfen sisteminizde aşağıdaki önkoşulların etkinleştirildiğinden emin olun.

  • Microsoft Windows, Linux veya Node.js ile uyumlu herhangi bir işletim sistemi
  • Node.js ve Node.js/Java Bridge yüklü
  • Oracle JDK sürüm 7 veya üstü

Code to be executed - JavaScript


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

let BarcodeGenerator = aspose_barcode.BarcodeGenerator;
let EncodeTypes = aspose_barcode.EncodeTypes;

// Create an instane of the BarcodeGenerator class
let generator = new BarcodeGenerator(EncodeTypes.QR, "");

// Specify the X-dimension 
// the smallest width of the unit of BarCode bars or spaces
generator.getParameters().getBarcode().getXDimension().setMillimeteres(2);

// Set codetext position
generator.getParameters().getBarcode().getCodeTextParameters().setLocation(CodeLocation.Below);

// Generate and save image
generator.save("example.png", aspose_barcode.BarCodeImageFormat.PNG);
Generation result