| | |
| | | private InsOrderMapper insOrderMapper; |
| | | |
| | | @Resource |
| | | private StandardMethodListMapper standardMethodListMapper; |
| | | |
| | | @Resource |
| | | private InsOrderStateMapper insOrderStateMapper; |
| | | |
| | | @Resource |
| | |
| | | os = new FileOutputStream(file); |
| | | //要转换的word文件 |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(wordPath); |
| | | TableCollection tables = doc.getFirstSection().getBody().getTables(); |
| | | for (Table table : tables) { |
| | | RowCollection rows = table.getRows(); |
| | | table.setAllowAutoFit(false); |
| | | for (Row row : rows) { |
| | | CellCollection cells = row.getCells(); |
| | | for (Cell cell : cells) { |
| | | CellFormat cellFormat = cell.getCellFormat(); |
| | | cellFormat.setFitText(false); //设置自适应关闭 |
| | | cellFormat.setWrapText(true); // 设置自动换行 |
| | | } |
| | | } |
| | | } |
| | | doc.updateFields(); |
| | | doc.save(os, SaveFormat.PDF); |
| | | |
| | | //添加骑缝章 |
| | | stamperCheckMarkPDF(pdfPath.replace(".pdf", "-1.pdf"), pdfPath, imgUrl + "/" + sealUrl); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |