| | |
| | | Sheet sheet = workbook.getSheetAt(0); |
| | | |
| | | // ===== 插入图片 ===== |
| | | byte[] imageBytes = printOrderDto.getCuttingImage(); |
| | | if(printOrderDto.getCuttingImage() != null){ |
| | | byte[] imageBytes = printOrderDto.getCuttingImage(); |
| | | |
| | | int pictureIdx = workbook.addPicture(imageBytes, Workbook.PICTURE_TYPE_JPEG); |
| | | CreationHelper helper = workbook.getCreationHelper(); |
| | | Drawing<?> drawing = sheet.createDrawingPatriarch(); |
| | | int pictureIdx = workbook.addPicture(imageBytes, Workbook.PICTURE_TYPE_JPEG); |
| | | CreationHelper helper = workbook.getCreationHelper(); |
| | | Drawing<?> drawing = sheet.createDrawingPatriarch(); |
| | | |
| | | ClientAnchor anchor = helper.createClientAnchor(); |
| | | anchor.setCol1(6); // 第7列(G列) |
| | | anchor.setRow1(7); |
| | | anchor.setDx1(142700); // 向右移动(约半格) |
| | | anchor.setDy1(222700); |
| | | ClientAnchor anchor = helper.createClientAnchor(); |
| | | anchor.setCol1(6); // 第7列(G列) |
| | | anchor.setRow1(7); |
| | | anchor.setDx1(142700); // 向右移动(约半格) |
| | | anchor.setDy1(222700); |
| | | |
| | | anchor.setCol2(8); // 宽度终点 |
| | | anchor.setRow2(9); // 高度终点 |
| | | anchor.setCol2(8); // 宽度终点 |
| | | anchor.setRow2(9); // 高度终点 |
| | | |
| | | Picture picture = drawing.createPicture(anchor, pictureIdx); |
| | | Picture picture = drawing.createPicture(anchor, pictureIdx); |
| | | // picture.resize(0.5); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | // 进行合并操作 切料示意图部分 |
| | | int startRow = 7; |