-2

I have a java EE web application from where I can generate barcode using barcode4j.jar and I copied generated ByteArrayOutputStream to a mapped variable which I am using same in iReport (java.io.InputStream) with image component.

But not printing when I download pdf. All I need is:

  1. How to map generated barcode in iReport.
  2. Do I need to use image or Barcode component.
  3. If I use barcode component (of barcode4j) what is the expression I have to give.

Please provide solution or some useful links.

Bishan
  • 15,211
  • 52
  • 164
  • 258
  • StackOverflow is neither a forum, tutorial site nor web search replacement. We can [help with certain problems](https://stackoverflow.com/help/on-topic), but it's **your** job to [put some efforts](http://meta.stackoverflow.com/questions/261592) in the first place, including elementary [(re)search](https://google.com/). – Marcin Orlowski Dec 29 '17 at 04:54

1 Answers1

-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.