As far as I know, the barcode as such cannot be rotated (iReport does not have this property, and Barcode Barcode in the Java class does not work). I saw several examples, but they are incomplete, and I do not understand how to use them, for example:
public class BarbecueRenderer extends JRAbstractSvgRenderer { private boolean rotate; private Barcode barcode = null; public BarbecueRenderer(Barcode barcode) { this(barcode, false); } public BarbecueRenderer(Barcode barcode, boolean rotate) { this.barcode = barcode; this.rotate = rotate; }
I need something like this:
Barcode barcode = BarcodeFactory.createCode39("128", false); // rotate the barcode File f = new File ("c:\\barcode.jpg"); BarcodeImageHandler.saveJPEG(barcode, f);
source share