JasperReports 워크플로에 맞는 바코드 출력

Aspose.BarCode for JasperReports는 단일 JAR로 배포하는 순수 Java 확장입니다. 별도의 렌더링 서비스를 만들지 않고도 리포트 작성자가 리포트에 바코드를 배치할 수 있습니다. 바코드 크기와 선명도가 중요한 인보이스, 배송 라벨, 티켓, 내부 양식에 유용합니다.

  • 단일 JAR 배포

    JasperReports 또는 JasperServer에 맞는 위치에 JAR 하나를 복사해 배포합니다. 환경이 달라도 설정을 단순하게 유지할 수 있습니다.

  • 리포트 렌더링 시점에 바코드 생성

    리포트 데이터셋의 필드와 파라미터에 바코드 값을 바인딩합니다. 바코드는 일반적인 내보내기/인쇄 워크플로의 일부로 렌더링됩니다.

  • 인쇄 친화적 출력 형식

    일반적인 내보내기에는 래스터 이미지를 렌더링하고, 인쇄 레이아웃에서 선명한 확대/축소가 필요할 때는 SVG 및 EMF를 사용할 수 있습니다.

  • 폭넓은 심볼로지 지원

    QR Code, Data Matrix, PDF417, Code 128 등을 포함해 동일한 리포팅 스택에서 널리 쓰이는 1D/2D 형식을 사용할 수 있습니다.

표준? 모두 지원합니다.

Aspose.BarCode for JasperReports SVG, EMF 같은 벡터 형식을 포함한 주요 이미지 형식과 PDF를 지원합니다. API로 [files] 를 손쉽게 인식할 수 있습니다( https://docs.aspose.com/barcode/jasperreports/supported-file-formats/ ) (스캐너나 카메라에서도 간단히). 아래는 지원되는 모든 바코드 심볼로지(1D, 2D, 우편, 복합 유형 포함)입니다. 지원되는 모든 플랫폼에서 생성 및 인식할 수 있습니다.

매트릭스 / 2D 코드

  • QR Code, MicroQR, rMQR
  • Data Matrix, Industrial Data Matrix (DPM)
  • Aztec
  • Han Xin
  • MaxiCode
  • DotCode

선형 / 1D 코드

  • UPCA, UPCE
  • EAN13, EAN14, EAN8
  • Code 128
  • DataBar
  • ITF
  • Postal

산업용 & 복합 코드

  • GS1
  • ECI
  • Composite barcodes
  • HIBC
  • SwissQR
  • Royal Mailmark

시스템 요구 사항 및 배포 옵션

Aspose.BarCode for JasperReports는 Java SE(J2SE) 5.0 이상에서 동작하며 JasperReports 및 JasperServer와 통합됩니다. 제품 문서에는 JasperReports 2.0+ 및 3.0+ 호환성이 안내되어 있습니다. Maven으로 의존성을 관리하거나, JAR 패키지를 다운로드해 JasperReports/JasperServer 설치에 배포할 수 있습니다.

Microsoft Windows
Linux
macOS

코드 예제: JasperReports에서 파라미터 기반 바코드 스타일링

바코드 콘텐츠와 시각적 속성을 재사용 가능한 그룹으로 정의하고, 리포트 파라미터로 값을 전달하며, JRXML 템플릿을 컴파일하고, 완성도 높은 PDF로 내보내세요 — Aspose.BarCode for JasperReports로 깔끔한 코드 중심 워크플로를 구성할 수 있습니다.

// Input JRXML template path + output PDF path
String patternFilePath = path + "builder-params1.jrxml";
String reportFilePath   = out  + "builder-params1.pdf";

// Create ReportBuilder (main entry point for assembling the report)
ReportBuilder reportBuilder = new ReportBuilder();

// Define a reusable barcode attributes group (styling + barcode content settings)
BarcodeAttributesGroup attributesGroup = new BarcodeAttributesGroup("barcode-attributes1");
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.CodeText, "EAN14");
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.EncodeType, EncodeTypes.EAN_14);
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.ForeColor, new Color(85, 107, 47));
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BackColor, new Color(245, 245, 220));
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderColor, new Color(39, 64, 139));
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderVisible, true);
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderWidth, 2);
attributesGroup.addBarcodeAttribute(BarcodeAttributeName.BorderDashStyle, DashStyle.Solid);

// Attach the barcode attributes group + provide report parameters used by the template
reportBuilder.addBarcodeAttributesGroup(attributesGroup);
reportBuilder.addReportParameter("barcode-title1", "Barcode for EAN14");
reportBuilder.addReportParameter("report-title", "Example of ReportBuilder with customer's parameters");
reportBuilder.addReportParameter("author", "Report prepared By Alex");
reportBuilder.setPatternFilePath(patternFilePath);

// Compile the template and get JasperPrint (ready-to-export report instance)
JasperPrint jasperPrint = reportBuilder.compileReport().getJasperPrint();

// Configure PDF exporter (input JasperPrint + PDF settings)
JRPdfExporter exporter = new JRPdfExporter();
ExporterInput exporterInput = new SimpleExporterInput(jasperPrint);
exporter.setExporterInput(exporterInput);
PdfExporterConfiguration pdfExporterConfiguration = new SimplePdfExporterConfiguration();
exporter.setConfiguration(pdfExporterConfiguration);

// Prepare output stream and run export to PDF file
File saveToFile = new File(reportFilePath);
OutputStream outputStream = new FileOutputStream(saveToFile);
SimpleOutputStreamExporterOutput outputStreamExporterOutput = new SimpleOutputStreamExporterOutput(outputStream);
exporter.setExporterOutput(outputStreamExporterOutput);

exporter.exportReport();

청구, 물류, 운영 리포트를 위한 바코드

JasperReports는 운영 시스템을 거치는 문서를 생성하는 데 자주 사용됩니다. 바코드를 추가하면 문서를 스캔 가능하게 만들고 수동 입력을 줄일 수 있습니다.

  • 인보이스 및 명세서: 문서 ID와 고객 참조를 인코딩
  • 배송 라벨 및 패킹 리스트: 트래킹 코드와 내부 라우팅 ID 포함
  • 티켓 및 패스: 컴팩트한 페이로드를 위한 2D 바코드 생성
  • 자산 및 재고 리포트: 대사 워크플로를 위한 스캔 가능한 식별자 추가
  • 내보내기 준비 이미지: PNG, JPEG, TIFF, BMP, GIF, EXIF + SVG 및 EMF

JasperReports 팀을 위해 설계

Feature icon

단일 JAR로 제공되는 순수 Java 확장

Feature icon

JasperReports 필드/파라미터로 바코드 값 구동

Feature icon

인쇄용 일반 래스터 및 벡터 형식으로 출력

Feature icon

JasperReports 및 JasperServer 배포에서 동작

Feature icon

1D/2D/우편 패밀리 전반의 80+ 바코드 심볼로지

Feature icon

리포트 통합 및 설정을 위한 예제와 가이드