2017-12-29 3 views
-2

를 사용하여 바코드를 인쇄 할 그리고 내가 에서 동일한 사용하고 매핑 된 변수에 있는 ByteArrayOutputStream 생성 복사 된 iReport(java.io.InputStream) 이미지 구성 요소가 포함되어 있습니다.내가 <code>barcode4j.jar</code>를 사용하여 바코드를 생성 할 수있는 곳에서 자바 EE 웹 응용 프로그램을 자바 EE 애플리케이션과의 iReport와 barcode4j.jar

그러나 pdf를 다운로드 할 때 인쇄되지 않습니다. 필요한 것은 다음과 같습니다.

  1. 생성 된 바코드를 iReport에 매핑하는 방법.
  2. 이미지 또는 바코드 구성 요소를 사용해야합니까?
  3. (barcode4j의) 바코드 구성 요소를 사용하면 무엇을 표현해야합니까?

해결책이나 유용한 링크를 제공해주십시오.

+0

StackOverflow는 포럼, 튜토리얼 사이트 또는 웹 검색 대체가 아닙니다. 우리는 [특정 문제에 도움을] (https://stackoverflow.com/help/on-topic) 할 수 있지만, ** [노력을 기울이는] 당신의 ** 직업입니다. (http://meta.stackoverflow.com/questions/261592)를 기본 검색 주소로 사용합니다 (https://google.com/). –

답변

-1
Earlier I thought we need to code in the application too to get the barcode printed but after my poc with help of another stackoverflow post that it is only required to place the all the below jars and add the barcode component in jrxm file is engough. Meaning below two were required to print(which is readable also) barcode . 

1.add below jars into lib. 
avalon-framework-impl-4.2.0.jar 
barcode4j-2.0.jar 
batik-anim.jar 
batik-awt-util.jar 
batik-bridge.jar 
batik-css.jar 
batik-dom.jar 
batik-ext.jar 
batik-gvt.jar 
batik-parser.jar 
batik-script.jar 
batik-svg-dom.jar 
batik-util.jar 
batik-xml.jar 
commons-beanutils-1.8.2.jar 
commons-cli-1.0.jar 
commons-collections-3.2.1.jar 
commons-digester-2.1.jar 
commons-logging-1.1.jar 
jdom-1.0.jar 
saxon-9.1.0.8.jar 
saxon8-dom.jar 
servletapi-2.2.jar 
xalan-2.7.0.jar 
xercesImpl-2.9.1.jar 
xml-apis-1.3.04.jar 
xml-apis-ext.jar 

2. Modify the jrxml. Add the barcode component (with barcode4j.jars). And add code Expression with your required field.