An easy way to convert Excel 2003 and Excel 2007 to PDF by Java code based on Apache POI and itext7
IExcel2PDF excel2PdfTool = EPFactory.getEP("case6.xlsx", "output1.pdf", System.getProperty("user.dir") + "/doc/font/SimHei.TTF");
if(excel2PdfTool != null) {
excel2PdfTool.convert();
}
<dependency>
<groupId>com.github.zhangchunsheng</groupId>
<artifactId>excel-to-pdf</artifactId>
<version>1.0.2</version>
</dependency>
https://github.com/itext/itext7
https://www.tutorialspoint.com/itext/itext_text_annotation.htm
支付宝 | 微信 |