PNG JPG BMP TIFF SVG
Aspose.BarCode  for Java
ISBN

Java로 ISBN 라벨 생성

Java API용 서버 측 Aspose.BarCode를 사용하여 Java에서 ISBN 바코드을 생성합니다.

How to Generate ISBN 바코드 Using Java

ISBN 바코드을(를) 생성하려면 풍부하고 강력하며 사용하기 쉬운 Java용 바코드 API인 Aspose.BarCode for Java API를 받으세요. 기반 플랫폼. Maven 에서 직접 최신 버전을 다운로드한 다음 Maven에 설치합니다. pom.xml에 다음 구성을 추가하여 기반 프로젝트:

Repository

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>

Dependency

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-barcode</artifactId>
    <version>version of aspose-barcode API</version>
    <classifier>jdk17</classifier>
</dependency>

Java에서 ISBN 바코드을 생성하는 단계

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

  • BarCodeGenerator 클래스의 새 객체 생성
  • ISBN 바코드 및 기타 필수 바코드 유형을 EncodeTypes 매개변수로 정의
  • setCodeText 메서드를 사용하여 입력 텍스트 지정
  • BarCodeGenerator.save 메서드를 사용하여 생성된 바코드 이미지 저장

시스템 요구 사항

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

  • Microsoft Windows, Linux 또는 JSP/JSF 및 데스크톱 애플리케이션용 Java Runtime Environment와 호환되는 모든 OS
  • JRE 1.6 이상과 같은 Java 개발 환경
  • Java 개발 버전 JSE2 7.0 이상

Code to be executed - Java


// Create an instane of the BarcodeGenerator class
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.ISBN);

// Specify the code text
generator.setCodeText("");

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

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

// Generate image
generator.generateBarCodeImage();
Generation result