我使用aspose.cells(22.12)把excel文件转换为pdf,在使用itext(5.5.13.3)读取的时候报错,并不是所有的excel都有这样的问题。
excel文件和报错提示
zip.zip (2.2 MB)
以下是我的代码
public static void main(String[] args) throws Exception{
Workbook workbook = new Workbook("src/test/resources/document/xlsx.xlsx");
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
// 缩放到一个页面(如果列太多,太长)
pdfSaveOptions.setAllColumnsInOnePagePerSheet(true);
workbook.save("src/test/resources/pdf/xlsx.pdf", pdfSaveOptions);
PdfReader pdfReader = new PdfReader("src/test/resources/pdf/xlsx.pdf");
}