Java版企业级国产文档开发套包Spire.Office v3.9.4全新上线!内含多种常见格式处理控件新版下载

原创|产品更新|编辑:李显亮|2020-10-09 09:57:10.510|阅读 577 次

概述:office文档组件开发控件Spire.Office for Java 3.9.4现已正式发布。此次更新的版本拥有许多新功能,与此同时,一些在加载、操作和转换Word、Excel、PDF和Presentation文档及扫描条形码时出现的问题也得以成功解决,欢迎下载体验。

# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>

你在寻找支持在Java中用编程方法处理各类格式文档的API吗?好巧,Java版企业级文档管理组合套包Spire.Office 2020全新上线!Word、Excel、PPT、PDF、条形码等格式一网打尽。

目前,Spire.Office for Java 迎来了v3.9.4版的更新。此次更新的版本拥有许多新功能,例如,Spire.Doc for Java支持比较两个Word文档和清除单元格背景;Spire.PDF for Java支持将SVG转换到PDF;Spire.XLS for Java支持将Excel转换到TIFF;Spire.Presentation for Java支持更新PPT文档中的Video视频数据;Spire.Barcode for Java支持设置条码顶部文本的排列方式。与此同时,一些在加载、操作和转换Word、Excel、PDF和Presentation文档及扫描条形码时出现的问题也得以成功解决。点击下方按钮即可下载试用↓↓↓

免费下载Spire.Office for Java v3.9.4

*这么优秀的国产工具怎能错过呢!10月IT行业爆品采购节!全线产品均享85折起,查看优惠价格!想要获取更多福利的朋友可以咨询在线客服哦~

新功能及问题修复详情,请参阅如下内容。


Spire.DOC for Java(点击下载)

新功能:

  • 支持比较两个Word文档
  • Document doc1 = new Document(); doc1.loadFromFile(inputFile_1); Document doc2 = new Document(); doc2.loadFromFile(inputFile_2); doc1.compare(doc2, "E-iceblue"); doc1.saveToFile(outputFile);
  • 支持清除单元格背景
  • tablecell.getCellFormat().clearBackground();
  • 支持在转换Word到图片时设置图片分辨率
  • doc.saveToImages(pageIndex, pageCount, ImageType.Bitmap, dpiX, dpiY);

优化:

  • 优化了加载word文档的时长
  • 优化了转换Word到PDF的时长

问题修复:

  • 修复了转换HTML到PDF,多出方框的问题
  • 修复了转换Word到PDF,横线丢失的问题
  • 修复了转换Word到PDF,内容不正确的问题
  • 修复了设置文本框背景色为无填充不生效的问题
  • 修复了保存到.doc,表格被分页的问题
  • 修复了图表交替插入题注,交叉引用位置不正确的问题
  • 修复了加载文档程序抛异常“IllegalArgumentException”
  • 修复了添加图片到页眉,生成的.docx用微软Word2007版本打开提示内容有错误的问题
  • 修复了保存文档,修订不正确的问题
  • 修复了转换Word到图片,内容格式不正确的问题
  • 修复了获取文档页数时程序抛异常ArrayIndexOutOfBoundsException的问题。
  • 修复了移除分节符保存文档时程序抛异常Specified method is not supported的问题。
  • 修复了插入目录后进行更新目录域时程序抛异常StackOverflowError的问题。
  • 修复了加载文档时抛出异常No have this value 3的问题。
  • 修复了插入目录后进行更新目录域时程序抛异常Index is less than 0 or more than or equal to the list count的问题。
  • 修复了转换Doc到图片程序抛出异常com.spire.doc.packages.sprezB: No have this value 4的问题。
  • 修复了转换Word到PDF时heading1域的值不正确的问题。

Spire.PDF for Java(点击下载)

新功能:

  • 支持转换SVG到PDF。
  • PdfDocument doc = new PdfDocument(); doc.loadFromSvg(inputFile_svg); doc.saveToFile(outputFile);
  • 支持添加SVG图片到PDF文档中。
  • PdfDocument doc1 = new PdfDocument(); doc1.loadFromSvg(inputFile_svg); PdfDocument doc2 = new PdfDocument(); doc2.loadFromFile(inputFile_pdf); doc2.getPages().get(0).getCanvas().drawTemplate(doc1.getPages().get(0).createTemplate(), new Point2D.Float(10,10), new Dimension(100,100) ); doc2.saveToFile(outputFile, FileFormat.PDF); doc1.close(); doc2.close();
  • 支持以流式布局转换PDF到Word。
  • PdfDocument pdf = new PdfDocument(); pdf.loadFromFile(inputFile); pdf.getConvertOptions().setConvertToWordUsingFlow(true); pdf.saveToFile(outputFile_doc, FileFormat.DOC);
  • 支持转换PDF到Excel。
  • PdfDocument pdf = new PdfDocument(); pdf.loadFromFile(inputFile); pdf.saveToFile(outputPath, FileFormat.XLSX);

问题修复:

  • 修复了绘制阿拉伯字形不正确的问题。
  • 修复了提取文本乱码的问题。
  • 修复了Ubuntu系统上转换PDF到图片,内容不正确的问题。
  • 修复了转换PDF到图片,出现多余虚线的问题。
  • 修复了转换PDF到图片,图章丢失的问题。

Spire.XLS for Java(点击下载)

新功能:

  • 新增方法workbook.saveToTiff(String filename)支持转换Excel到一个tiff文件。
  • 转换excel到image时支持了设置dpi。
  • workbook.getConverterSetting().setXDpi(300); workbook.getConverterSetting().setYDpi(300); Worksheet sheet; for (int i = 0; i < wb.getWorksheets().size(); i++) { sheet = wb.getWorksheets().get(i); sheet.saveToImage(outputFile + i + ".png"); }

问题修复:

  • 优化了转换Excel到html的时间性能。
  • 修复了转换excel到pdf时抛出异常NumberFormatException的问题。
  • 修复了转换excel到图片时抛异常Size of image is too large的问题。
  • 修复了Ubuntu上转换excel到图片抛出异常java.lang.IllegalStateException: Cannot find a required cmap table.的问题。
  • 修复了转换excel到图片时图片内容不清晰的问题。
  • 修复了转换excel到pdf时数字格式不正确的问题。
  • 修复了获取xls文档属性值失败的问题。
  • 修复了在xls文档里插入背景图片不显示的问题。
  • 修复了转换excel到html数字值不正确的问题。

Spire.Presentation for Java(点击下载)

新功能:

  • 支持更新PPT文档中的Video视频数据。
  • File file = new File("videoPath"); FileInputStream fileInputStream = new FileInputStream(file); byte[] data = new byte[(int)file.length()]; fileInputStream.read(data); VideoCollection videos = presentation.getVideos(); VideoData videoData = videos.append(data); IVideo iVideo = (IVideo) presentation.getSlides().get(0).getShapes().get(0); iVideo.setEmbeddedVideoData(videoData);
  • 支持获取Audio和Video的PartName属性。
  • for (int i = 0; i < presentation.getSlides().getCount(); i++) { ISlide slide = presentation.getSlides().get(i); for (int j = 0; j < slide.getShapes().getCount(); j++) { IShape shape = slide.getShapes().get(j); if (shape instanceof IAudio) { String audioPartName = ((IAudio) shape).getData().getPartName(); } if (shape instanceof IVideo) { String videoPartName = ((IVideo) shape).getEmbeddedVideoData().getPartName(); } }
  • 支持获取强调类型动画的Amount属性。
  • for (int i = 0; i < slide.getTimeline().getMainSequence().getCount(); i++) { AnimationEffect animationEffect = slide.getTimeline().getMainSequence().get(i); AnimationAmountType amount = animationEffect.getAmount(); }
  • 支持获取动画的效果。
  • Presentation presentation = new Presentation(); presentation.loadFromFile("data/animation.pptx"); for (int c = 0; c < presentation.getSlides().getCount(); c++) { ISlide slide = presentation.getSlides().get(c); for (int i = 0; i < slide.getTimeline().getMainSequence().getCount(); i++) { AnimationEffect animationEffect = slide.getTimeline().getMainSequence().get(i); //预设类型,比如Entrance,Emphasis,Exit,Path String presetClassType = animationEffect.getPresetClassType().getName(); //获取动画效果类型 AnimationEffectType animationEffectType= animationEffect.getAnimationEffectType(); //获取目标Shape Shape shape = animationEffect.getShapeTarget(); //获取动画效果子类型 String subType = animationEffect.getSubtype().getName(); //获取Color Color color = animationEffect.getColor(); //当动画效果类型为Faded_Zoom时,获取vanishing point(消失点) if (animationEffectType.equals(AnimationEffectType.FADED_ZOOM)) { String vanishingPointName = animationEffect.getVanishingPoint().getName(); } //获取WAVE动画效果 if (animationEffectType.equals(AnimationEffectType.WAVE)) { TextAnimationCollection textAnimations = slide.getTimeline().getTextAnimations(); if (textAnimations.size() > 0) { for (int j = 0; j < textAnimations.size(); j++) { ParagraphBuildType buildType = textAnimations.get(j).getParagraphBuildType(); } } } } }

优化:

  • 优化了生成的PPT文档大小。

问题修复:

  • 修复了PPT转PDF,线条位置不正确的问题。
  • 修复了设置文本下划线不起作用的问题。
  • 修复了创建散点直线类型的图表含有标记的问题。
  • 修复了保存文档抛"NullReferenceException"的问题。
  • 修复了设置动画期间时间不生效的问题。
  • 修复了PPT转PDF抛"NullPointerException"的问题。
  • 修复了保存文档和调整幻灯片顺序抛错误"Unknown char: 林"的问题。
  • 修复了获取到的动画持续时间不正确的问题。
  • 修复了获取动画运动轨迹抛"NullPointerException"的问题。
  • 修复了无法获取到PPT动画的问题。
  • 修复了插入HTML文本到PPT,br标签不生效的问题。
  • 修复了无法获取到PPT动画的Subtype属性的问题。
  • 修复了转换.pptx to pdf程序抛"NullPointerException "的问题。
  • 修复了了转换.pptx to pdf图表坐标轴内容格式不正确的问题。

Spire.Barcode for Java (点击下载)

新功能:

  • 支持设置条码顶部文本的排列方式。
  • int width = 399; int height = 159; BarcodeSettings bs = new BarcodeSettings(); bs.setType(BarCodeType.UPCA); bs.setUnit(GraphicsUnit.Pixel); bs.setWideNarrowRatio(0.5f); bs.setTextFont(new Font("Arial", Font.PLAIN,20 )); String data = "602318275035"; bs.setData(data); bs.setData2D(data); bs.setShowTextOnBottom(true); bs.setTopText(data); bs.setShowTopText(true); bs.setTextAlignment(StringAlignment.Center); bs.setTopTextAligment(StringAlignment.Center); bs.setTopTextFont(new Font("Arial", Font.PLAIN, 20)); bs.setAutoResize(false); bs.setX(3.0f); bs.setBarHeight(height * 0.6f); bs.setImageHeight(height); bs.setImageWidth(width); BarCodeGenerator barCodeGenerator = new BarCodeGenerator(bs); BufferedImage bufferedImage = barCodeGenerator.generateImage(); ImageIO.write(bufferedImage, "png", new File("result.png"));
  • 支持在条形码底部添加自定义文本。
  • barsetting.setBottomText("EAN"); barsetting.setBottomTextFont(new Font("fangsong", Font.BOLD, 25)); barsetting.setBottomTextColor(Color.BLACK); barsetting.setShowBottomText(true); barsetting.setBottomTextAlignment(StringAlignment.Center);

问题修复:

  • 修复了扫描条形码得到的数据不正确的问题。
  • 修复了扫描条形码失败的问题。
  • 修复了扫描条形码程序抛“NullPointerException”的问题。
  • 修复了添加自定义文本不生效的问题。
  • 修复了扫描含特殊字符的QR码,得到的数据错误的问题。

还想要更多吗?您可以点击阅读
【2020 · E-iceblue最新资源整合】查找需要的教程资源。 让人兴奋的是整合所有格式API处理套包Spire.office for Java正在慧都网火热销售中!联系慧都客服立马1分钟了解全部咨询!
标签:

本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@evget.com


为你推荐

  • 推荐视频
  • 推荐活动
  • 推荐产品
  • 推荐文章
  • 慧都慧问
扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP