本次版本更新带来了一系列新的功能,此外,该版本还修复了大量问题,欢迎下载体验。
你在寻找支持在Java中用编程方法处理各类格式文档的API吗巧,Java版企业级文档管理组合套包Spire.Office 2021全新上线!Word、Excel、PPT、PDF、条形码等格式一 打尽。
目前,
新功能及问题修复详情,请参阅如下内容。
Spire.XLS for Java
新功能:
- 支持了加载包含数学公式的excel文档和保存到其他格式(例如,PDF,图片,SVG, XPS等)
- 支持添加/删除数字签名
Workbook workbook=new Workbook();workbook.loadFromFile("C:/sample.xlsx");CertificateAndPrivateKey cap = new CertificateAndPrivateKey("C:/Test1.pfx","e-iceblue");workbook.addDigitalSignature(cap, "e-iceblue",new Date());String result="C:/result.xlsx";workbook.saveToFile(result,ExcelVersion.Version2013);Workbook workbook2=new Workbook();workbook2.loadFromFile(result);workbook2.removeAllDigitalSignatures();String result2="C:/result2.xlsx";workbook2.saveToFile(result2,ExcelVersion.Version2013);
workbook.getWorksheets().get(0).getPageSetup().setCustomPaperSize(100, 100);
问题修复:
- 修复了创建条件日期格式时颜色更新不正确的问题
- 修复了隐藏空白行时程序抛异常“java.lang.NullPointerException”的问题
- 修复了Excel转HTML内容不正确的问题
- 修复了XLSX转XLSM数据被隐藏的问题
Spire.PDF for Java
新功能:
- 查找换行文本时,支持返回所有的矩形区域信息
PdfDocument doc = new PdfDocument(); doc.loadFromFile(inputFile);FileWriter fileWriter = new FileWriter(outputFile, true);int index=0;for (PdfPageBase page : (Iterable) doc.getPages()) {index++; PdfTextFind[] results = page.findText("findtext", EnumSet.of(TextFindParameter.CrossLine)).getFinds();for (PdfTextFind text : results){text.applyHighLight(); List bounds = text.getTextBounds(); String context="";for (Rectangle2D rectangle2D:bounds) {context +="current "+index+" page;content:"+text.getSearchText()+ ";X:="+rectangle2D.getX()+","+"Y:="+rectangle2D.getY()+","+ "Width:="+rectangle2D.getWidth()+","+"height:="+rectangle2D.getHeight()+"rn";} System.out.println(context); fileWriter.write(context); fileWriter.flush();}} fileWriter.close(); doc.saveToFile(outputPdf);
PdfDocument pdf = new PdfDocument();pdf.loadFromFile(input);pdf.removeDocumentJavaScript();pdf.saveToFile(output, FileFormat.PDF);
问题修复:
- 修复了提取的文本内容不正确的问题
- 修复了循环给文档添加水印时,消耗内存大的问题
- 修复了转换PDF到Word内容重叠的问题
- 修复了转换PDF到PDF/A-3B抛异常(Value cannot be null)的问题
- 修复了添加水印,程序抛异常的问题
- 修复了转换PDF到PDFA1A,在线验证不通过的问题
- 修复了转换PDF到PDF/A格式内容丢失的问题
Spire.Presentation for Java
优化:
- 优化了插入图片耗时长的问题
新功能:
- 支持表格的分布行和分布列的功能
ISlide slide = presentation.getSlides().get(0);ITable table = (ITable) slide.getShapes().get(0);table.distributeRows(0,3);table.distributeColumns(0,2);
问题修复:
- 修复了PPT转PDF内存消耗太大的问题
- 优化了转换PPTX到PDF的时间
- 修复了在Centos系统上提取图片抛异常“ArrayIndexOutOfBoundsException”的问题
- 修复了加载文档抛异常“Property not found”的问题
- 修复了转换PPT到PDF内容不正确的问题
- 修复了获取PPT文件中Chart数据,抛异常“ArrayIndexOutOfBoundsException”的问题
是E-iceblue官方友好合作伙伴,如果您对spire.office感兴趣,可以联系在线客服了解具体授权价格和使用机制。
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!