Spire.PDF for Java更新至v3.10.5,该版本优化了转换PDF到图片的转换时间和加文本水印到PDF的时间,支持获取PDF水印和插入SVG到PDF的功能,以及修复了PDF转化到Word/Image时出现的问题,欢迎下载体验。
这么优秀的国产工具怎能错过呢!软件国产化服务季!全线产品均享85折起,查看优惠价格!想要获取更多福利的朋友咨询在线客服哦~
优化
- 优化了转换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()+"rn"); }
-
支持插入SVG到PDF
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);
Bug修复
- 修复了查找关键字失败的问题。
- 修复了多线程下转PDF到Image内存一直增长的问题。
- 修复了转换PDF到图片程序卡住的问题。
- 修复了提取PDF文本,程序抛“java.lang.NullPointerException”。
- 修复了从字体有问题的PDF文档提取文本,程序抛“outofmemory”的异常。
- 修复了转换PDF到Word, 程序抛“java.lang.NullPointerException”。
是E-iceblue官方友好合作伙伴,如果您对spire.PDF感兴趣,可以联系在线客服了解具体授权价格和使用机制。
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!