基于 aspose,Excel转为 pdf工具类
TestForExcel2PDF.java
import com.aspose.cells.*;
import java.io.FileOutputStream;
import java.io.InputStream;
public class TestForExcel2PDF {
public static void main(String[] args) {
String sourceFilePath="d:/source.xlsx";
String desFilePath="d:/rest.pdf";
excel2pdf(sourceFilePath, desFilePath);
}
/**
* 获取license 去除水印
* @return
*/
public static boolean getLicense() {
boolean result = false;
try {
InputStream is = TestForExcel2PDF.class.getClassLoader().getResourceAsStream("\\license.xml");
License aposeLic = new License();
aposeLic.