| | |
| | | /////////////////////////生成Tab表格数据///////////////////////// |
| | | |
| | | String fileName = this.getClass().getClassLoader().getResource("contractTemplate/" + contractTemplate + ".docx").getPath();//获取文件路径 |
| | | return WordUtils.generate(fileName, map, tabParam); |
| | | |
| | | // String outPdfPath = fileName.split("\\.")[0]+".pdf"; |
| | | ResponseEntity<InputStreamResource> generate = WordUtils.generate(fileName, map, tabParam); |
| | | // WordUtils.documents4jWordToPdf(fileName,outPdfPath); |
| | | return generate; |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |