spire.office for java 3.11.0于今日发布。该版本包含了许多新功能,比如,spire.pdf for java支持获取pdf水印及插入svg到pdf;spire.xls for java支持透视表设置重复行标签。除此之外,它还修复了许多加载、操作、提取及转换word、excel、pdf和powerpoint文档时出现的问题。详情请参阅下文。
获取spire.office for java 3.11.0,请点击:https://www.e-iceblue.cn/downloads/spire-office-java.html
spire.doc for java
问题修复:
- 修复了插入目录后程序无法结束的问题。
- 修复了更新目录抛“stackoverflowerror”的问题。
- 修复了转换word到pdf,内容丢失的问题。
- 修复了转换word到pdf抛“object reference not set to an instance of an object.”的问题。
- 修复了转换html文本到word抛“unexpected eof parsing start tag 'span'”的问题。
- 修复了转换html文本到word,图片显示不正确的问题。
- 修复了转换word到pdf,页码不正确的问题。
spire.pdf for java
优化:
- 优化了转换pdf到图片的转换时间。
- 优化了添加文本水印到pdf的时间。
新功能:
- 支持获取pdf水印
pdfdocument pdf = new pdfdocument();
pdf.loadfromfile(outputfile);
pdfannotationcollection annotationwidget= pdf.getpages().get(0).getannotationswidget();
stringbuffer stringbuffer = new stringbuffer();
for(int i=0;i < annotationwidget.getcount();i ){
if (annotationwidget.get(i) instanceof pdfwatermarkannotationwidget){
stringbuffer.append(annotationwidget.get(i).gettext() "\r\n");
}
string inputfile_svg = "data/sample.svg";
string inputfile_pdf = "data/sample.pdf";
string outputfile = "result.pdf";
pdfdocument doc1 = new pdfdocument();
doc1.loadfromsvg(inputfile_svg);
pdfdocument doc2 = new pdfdocument();
doc2.loadfromfile(inputfile_pdf);
pdftemplate template = doc1.getpages().get(0).createtemplate();
template.draw(doc2.getpages().get(0).getcanvas(), new point2d.float());
doc2.savetofile(outputfile, fileformat.pdf);
问题修复:
- 修复了查找关键字失败的问题。
- 修复了多线程下转pdf到image内存一直增长的问题。
- 修复了转换pdf到图片程序卡住的问题。
- 修复了提取pdf文本,程序抛“java.lang.nullpointerexception”。
- 修复了从字体有问题的pdf文档提取文本,程序抛“outofmemory”的异常。
- 修复了转换pdf到word, 程序抛“java.lang.nullpointerexception”。
spire.xls for java
新功能:
- 支持透视表设置重复行标签。
pt.getpivotfields().get("month").isrepeatitemlabels(true);
问题修复:
- 修复了拷贝sheet,结果文档打开提示内容错误的问题。
- 修复了转换excel到pdf,内容不正确的问题。
- 修复了转换excel到html,内容格式错误的问题。
- 修复了转换excel到html,图片显示不正确的问题。
- 修复了转换excel到pdf,页眉显示不正确的问题。
- 修复了基于单元格的背景颜色和字体颜色排序失败的问题。
- 修复了从流加载excel,获取到sheet的行数不正确的问题。
spire.presentation for java
问题修复:
- 修复了多线程转换ppt到pdf,程序抛“exceptionininitializererror”异常。
- 修复了转换形状到图片,内容被裁切的问题。
- 修复了转换形状到图片,内容空白以及内容显示不全的问题。
- 修复了转换形状到图片,程序抛“nullpointerexception”异常。
- 修复了转换形状到图片,程序挂起的问题。
- 修复了加载pptx文档,程序抛“property not found”异常。
- 修复了提取动画的进入退出效果,程序抛“nullpointerexception”异常。修复了提取动画的进入退出效果,程序抛“nullpointerexception”异常。
- 修复了转换ppt到图片,文本字体被改变的问题。
- 修复了多线程下,执行程序抛“could not initialize class com.spire.presentation.packages.sprxmc”异常。