没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|产品更新|编辑:李显亮|2020-05-27 10:19:15.333|阅读 185 次
概述:Spire.Office for Java v3.5.0已正式发布。该版本带来了一些不错的新功能,例如,Spire.PDF支持数字签名时添加时间戳,支持各种形状的注释框到PDF;Spire.Presetation 支持获取形状中文本输入区域的最大宽度。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
你在寻找支持在Java中用编程方法处理各类格式文档的API吗?好巧,Java版企业级文档管理组合套包Spire.Office 2020全新上线!Word、Excel、PPT、PDF、条形码等格式一网打尽。
目前,Spire.Office for Java 迎来了v3.5.0版的更新。该版本带来了一些不错的新功能,例如,Spire.PDF支持数字签名时添加时间戳,支持各种形状的注释框到PDF;Spire.Presetation 支持获取形状中文本输入区域的最大宽度。点击下方按钮即可下载试用↓↓↓
免费下载Spire.Office for Java v3.5.0
新功能及问题修复详情,请参阅如下内容。
新功能
//配置时间戳服务器 String url = "https://freetsa.org/tsr"; signature.configureTimestamp(url);
signature.addShowConfigureText(SignatureConfigureText.Contact_Info);//显示Contact_Info(默认显示所有) signature.removeShowConfigureText(SignatureConfigureText.Contact_Info);//不显示Contact_Info signature.setShowConfigureText(EnumSet.of(SignatureConfigureText.Contact_Info));//只显示Contact_Info
PdfDocument pdf = new PdfDocument(); PdfPageBase page = pdf.getPages().add(); //箭头 String text1 = "this is Arrow annotation"; PdfFont font = new PdfFont(PdfFontFamily.Helvetica, 20); PdfSolidBrush brush1 = new PdfSolidBrush(new PdfRGBColor(Color.blue)); PdfStringFormat leftAlignment = new PdfStringFormat(PdfTextAlignment.Left, PdfVerticalAlignment.Middle); page.getCanvas().drawString(text1, font, brush1, 50, 50, leftAlignment); Dimension2D dimension = font.measureString(text1); Rectangle2D.Float bounds = new Rectangle2D.Float(50, 50, (float) dimension.getWidth(), (float) dimension.getHeight()); int[] linePoints = new int[]{92, (int) (page.getSize().getHeight() - bounds.getY() - 60), (int) (92 + bounds.getWidth()), (int) (page.getSize().getHeight() - bounds.getY() - 60)}; PdfLineAnnotation annotation1 = new PdfLineAnnotation(linePoints, "LineArrow annotation test"); annotation1.setBeginLineStyle(PdfLineEndingStyle.OpenArrow); annotation1.setEndLineStyle(PdfLineEndingStyle.OpenArrow); annotation1.setBackColor(new PdfRGBColor(Color.red)); annotation1.setCaptionType(PdfLineCaptionType.Inline); annotation1.setLineCaption(true); ((PdfNewPage) page).getAnnotations().add(annotation1); //云朵 String text2 = "this is Cloud annotation"; PdfBrush brush2 = PdfBrushes.getBlue(); page.getCanvas().drawString(text2, font, brush2, 50, 200); Point2D point2D[] = new Point2D[]{ new Point2D.Float(30, 200), new Point2D.Float(300, 180), new Point2D.Float(300, 250), new Point2D.Float(30, 220), new Point2D.Float(30, 200) }; PdfPolygonAnnotation annotation2 = new PdfPolygonAnnotation(page, point2D); annotation2.setText("PolygonCloud annotation test"); annotation2.setAuthor("E-iceblue"); annotation2.setSubject("test"); annotation2.setModifiedDate(new Date()); annotation2.setBorderEffect(PdfBorderEffect.Big_Cloud); annotation2.setLocation(new Point2D.Float(190, 230)); annotation2.setColor(new PdfRGBColor(Color.GRAY)); ((PdfNewPage) page).getAnnotations().add(annotation2); //椭圆 String text3 = "this is Circle annotation"; PdfBrush brush3 = PdfBrushes.getBlue(); Dimension2D dimension2D = font.measureString(text3); dimension2D.setSize(dimension2D.getWidth() + 35, dimension2D.getHeight() + 20); page.getCanvas().drawString(text3, font, brush3, 50, 300); Rectangle2D.Float annotationBounds1 = new Rectangle2D.Float(); annotationBounds1.setFrame(new Point2D.Float(36, (float) 290), dimension2D); PdfSquareAndCircleAnnotation annotation3 = new PdfSquareAndCircleAnnotation(annotationBounds1); annotation3.setSubType(PdfSquareAndCircleAnnotationType.Circle); float[] f1 = {0.5f, 0.5f, 0.5f, 0.5f}; annotation3.setRectangularDifferenceArray(f1); annotation3.setText("Circle annotation test"); annotation3.setColor(new PdfRGBColor(Color.RED)); annotation3.setModifiedDate(new Date()); annotation3.setName("*****"); LineBorder border1 = new LineBorder(); border1.setBorderWidth(2); annotation3.setLineBorder(border1); ((PdfNewPage) page).getAnnotations().add(annotation3); //矩形 String text4 = "this is Square annotation"; PdfBrush brush4 = PdfBrushes.getBlue(); Dimension2D dimension4 = font.measureString(text4); dimension2D.setSize(dimension2D.getWidth() + 80, dimension2D.getHeight() + 20); page.getCanvas().drawString(text4, font, brush4, 50, 400); Rectangle2D.Float annotationBounds2 = new Rectangle2D.Float(); annotationBounds2.setFrame(new Point2D.Float(30, (float) 400), dimension4); PdfSquareAndCircleAnnotation annotation4 = new PdfSquareAndCircleAnnotation(annotationBounds2); annotation4.setSubType(PdfSquareAndCircleAnnotationType.Square); float[] f2 = {0.5f, 0.5f, 0.5f, 0.5f}; annotation4.setRectangularDifferenceArray(f2); annotation4.setText("Square annotation test"); annotation4.setColor(new PdfRGBColor(Color.RED)); annotation4.setModifiedDate(new Date()); annotation4.setName("*****"); LineBorder border2 = new LineBorder(); border2.setBorderWidth(2); annotation4.setLineBorder(border2); ((PdfNewPage) page).getAnnotations().add(annotation4); //连接线 String text5 = "this is Connected lines annotation"; PdfBrush brush5 = PdfBrushes.getBlue(); page.getCanvas().drawString(text5, font, brush5, 50, 465); Point2D pointzd[] = new Point2D[]{ new Point2D.Float(30, 470), new Point2D.Float(300, 450), new Point2D.Float(300, 520), new Point2D.Float(30, 490), new Point2D.Float(30, 470) }; PdfPolygonAnnotation annotation5 = new PdfPolygonAnnotation(page, pointzd); annotation5.setText("Connected Lines annotation test"); annotation5.setAuthor("冰蓝"); annotation5.setSubject("test"); annotation5.setModifiedDate(new Date()); annotation5.setBorderEffect(PdfBorderEffect.None); annotation5.setLocation(new Point2D.Float(190, 230)); annotation5.setColor(new PdfRGBColor(Color.GRAY)); ((PdfNewPage) page).getAnnotations().add(annotation5); pdf.saveToFile("output/annotation.pdf");
for (PdfPageBase page : (Iterable) doc.getPages()) { content.append(page.extractText(true,true,true)); }
Bug修复
新功能
支持获取形状中文本输入区域宽度最大时文本的起始坐标
IAutoShape shape = (IAutoShape) ppt.getSlides().get(0).getShapes().get(0); double x = shape.getTextFrame().getStartLocationAtMaxWidth().getX(); double y = shape.getTextFrame().getStartLocationAtMaxWidth().getY();
支持获取形状中文本输入区域的最大宽度
IAutoShape shape = (IAutoShape) ppt.getSlides().get(0).getShapes().get(0); float maxWidth = shape.getTextFrame().getMaxWidth();
Bug修复
Bug修复
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@evget.com
Sketch 推出 2025 年首个重大版本更新「Athens」,重点在于优化 UI 设计体验的基础架构,引入了全新布局工具 Stacks,以及替代画板的容器系统 Frames 和 Graphics。同时,Command Bar 也迎来全面升级,为设计师带来更高效、更灵活的操作体验。本文将带你逐步了解这一版本的核心更新内容。
DevExpress WPF控件近期全新发布v24.2,此版本进一步升级了Spreadsheet(电子表格)组件的功能,欢迎下载最新版体验!
今天主要盘点一下JetBrains IDEs v2025.1发布的一些新功能,欢迎大家甄选适合的IDE体验!
ONLYOFFICE 与 Jira 集成的重大更新现已发布!从 4.0.0 版本开始,ONLYOFFICE 连接器允许您编辑 PDF 文件和表单、直接从编辑器创建新文件、可视化用户头像、在 Jira 平台内处理新文件格式等等。阅读本文,了解更多详情。
Spire.Office for Java 是企业级的处理办公文档的Java应用程序的API。
Spire.Doc for JavaSpire.Doc for Java是Java Word组件,具有生成、读取、转换Word文档等功能
Spire.PDF for Java独立专业的Java PDF组件,覆盖PDF文档生成、处理、转换等功能。
Spire.XLS for JavaSpire.XLS for Java让开发人员无需Microsoft Excel即可处理Excel
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@evget.com
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢
慧都科技 版权所有 Copyright 2003-
2025 渝ICP备12000582号-13 渝公网安备
50010702500608号