Now i'am using this renderer: Code: public class BarbecueRenderer extends JRAbstractSvgRenderer { /** * */ private Barcode barcode = null; private static final int DEFAULT_BAR_WIDTH = 1; private static final int DEFAULT_BAR_HEIGHT = 37; public BarbecueRenderer(Barcode barcode) { this.barcode = barcode; this.barcode.setBarWidth(DEFAULT_BAR_WIDTH); this.barcode.setBarHeight(DEFAULT_BAR_HEIGHT); this.barcode.setDrawingText(false); } public void render(Graphics2D g2d, Rectangle2D rect2d) throws JRException { if (barcode == null) { return; } double scaleX; double scaleY; Rectangle r = this.barcode.getBounds(); scaleX = rect2d.getWidth() / r.getWidth(); scaleY = rect2d.getHeight() / r.getHeight(); try { AffineTransform oldTF = g2d.getTransform(); AffineTransform scaler = AffineTransform.getScaleInstance(scaleX, scaleY); g2d.transform(scaler); this.barcode.draw(g2d, (int) (rect2d.getX() / scaleX), (int) (rect2d.getY() / scaleY)); g2d.setTransform(oldTF); } catch(OutputException e) { throw new JRException(e); } } public Dimension2D getDimension() { return this.barcode.getBounds().getSize(); } } Into my xml I this is the code: Code:[code] <image hAlign="Center" scaleImage="RetainShape"> <reportElement height="36" positionType="Float" width="291" x="31" y="101"/> <graphicElement/> <imageExpression class="net.sf.jasperreports.engine.JRRenderable"> <![CDATA[new br.com.datamanager.geradorrelatorio.renderers.BarbecueRenderer( net.sourceforge.barbecue.BarcodeFactory.createInt2of5($P{CODIGO_BARRAS}) )]]> </imageExpression> </image> Well... now when the application call JasperViewer first time barcode is rigth, but if i resize the window then barcode resizes.. and reduce, reduce... then it disappear... :blink: Someone can help me? What is happen? Post edited by: andre2k2, at: 2007/08/10 17:31