List of usage examples for com.itextpdf.text Image getRawData
public byte[] getRawData()
From source file:com.divudi.bean.BarcodeController.java
public byte[] getBarcodeBytes(String code) { Barcode39 code39 = new Barcode39(); code39.setCode(code);//w ww .jav a 2 s . c o m code39.setFont(null); code39.setExtended(true); Image image = null; try { image = Image.getInstance(code39.createAwtImage(Color.BLACK, Color.WHITE), null); } catch (BadElementException | IOException ex) { Logger.getLogger(BarcodeController.class.getName()).log(Level.SEVERE, null, ex); } return image.getRawData(); }