| | |
| | | BufferedImage bufferImg = ImageIO.read(new FileInputStream(new File(fileDirName+File.separator+bomHistory.getPictureUrl()))); |
| | | ImageIO.write(bufferImg, "png", byteArrayOut); |
| | | //anchor主要用于设置图片的属性 |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(50, 20, 1000, 230,(short) 16, rownum+i+1, (short) 16, rownum+i+1); |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(50, 20, 1000, 230,(short) 16, rownum, (short) 16, rownum); |
| | | anchor.setAnchorType(ClientAnchor.MOVE_AND_RESIZE); |
| | | //插入图片 |
| | | patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); |
| | |
| | | BufferedImage bufferImg = ImageIO.read(new FileInputStream(new File(fileDirName+File.separator+bom.getPictureUrl()))); |
| | | ImageIO.write(bufferImg, "png", byteArrayOut); |
| | | //anchor主要用于设置图片的属性 |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(50, 20, 1000, 230,(short) 16, rownum+i+1, (short) 16, rownum+i+1); |
| | | HSSFClientAnchor anchor = new HSSFClientAnchor(50, 20, 1000, 230,(short) 16, rownum, (short) 16, rownum); |
| | | anchor.setAnchorType(ClientAnchor.MOVE_AND_RESIZE); |
| | | //插入图片 |
| | | patriarch.createPicture(anchor, wb.addPicture(byteArrayOut.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); |