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

Node.js via Java로 Singapore Post 라벨 생성

Node.js via Java API용 서버 측 Aspose.BarCode를 사용하여 JavaScript에서 Singapore Post 바코드을 생성합니다.

How to Generate Singapore Post 바코드 Using Node.js via Java

Node.js 애플리케이션 내에서 Singapore Post 바코드 바코드를 생성하려면 Java 지향 플랫폼용으로 설계된 강력하고 사용자 친화적인 고급 바코드 API인 Java를 통해 Node.js용 Aspose.BarCode를 획득하십시오. NPM에서 Javascript용 aspose.barcode 를 쉽게 설치할 수 있습니다.

Command

  > npm i aspose.barcode

JavaScript에서 Singapore Post 바코드을 생성하는 단계

Aspose.BarCode를 사용하면 개발자가 몇 줄의 코드로 Singapore Post 바코드 이미지를 쉽게 만들 수 있습니다.

  • BarCodeGenerator 클래스의 인스턴스 생성
  • Singapore Post 바코드을 EncodeTypes 매개변수로 설정
  • 인코딩할 텍스트를 두 번째 매개변수로 정의
  • 필요한 경우 바코드 크기 및 위치 결정
  • BarCodeGenerator.save 메서드를 호출하여 생성된 바코드 이미지 가져오기

시스템 요구 사항

Aspose 바코드 API는 모든 주요 플랫폼 및 운영 체제에서 지원됩니다. 아래 코드 샘플을 실행하기 전에 시스템에서 다음 전제 조건이 활성화되어 있는지 확인하십시오.

  • Microsoft Windows, Linux 또는 Node.js와 호환되는 모든 OS
  • Node.js 및 Node.js/Java Bridge 설치
  • Oracle JDK 버전 7 이상

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