Word处理控件Aspose.Words for Java 8月最新版更新!调用HarfBuzz库

Aspose.Words for Java更新至最新版v19.8,选择调用HarfBuzz库(仅在Windows上)以获得更好的字距调整Aspose.Words for Java在Java 12上进行了测试,我们一起来看一看新功能详解吧!

Aspose.Words for Java是功能丰富的Word处理API。它允许开发人员在不使用Microsoft Word API的情况下嵌入在自己的Java应用程序中生成,修改,转换,呈现和打印文档的功能,提供访问和操作所有文档元素的格式属性的功能,多种格式的高质量转换,将单个页面或完整文档呈现为不同的文件格式,使用来自各种数据源或业务对象的数据生成 告等等。

Aspose.Words for Java更新至最新版v19.8,选择调用HarfBuzz库(仅在Windows上)以获得更好的字距调整Aspose.Words for Java在Java 12上进行了测试,我们一起来看一看新功能详解吧!>>欢迎下载Aspose.Words for Java v19.8体验

主要特点

  • 选择调用HarfBuzz库(仅在Windows上)以获得更好的字距调整。
  • 单独的Aspose.Words jdk16.jar可在Aspose下载站点上公开获得。
  • API示例已完全更新和改进。
  • Aspose.Words for Java在Java 12上进行了测试。
  • 当外部TIFF图像库(JAI等)不可用时,使用简化的TIFFImageWriter。
  • 实现了一个选项,允许指定是否使用文档的原始版本或修订版本。
  • 实现API以定义图表系列的数据标签的默认选项。
  • 固定的对角线边界渲染是垂直合并的单元格。
  • 修正了当“keep with next”应用于表格单元格的最后一段时出现的问题。
  • 改进了表格中亚洲文本段落度量的计算。
  • 改进代理对的处理。
  • 修正了负对比度图像渲染的问题。现在,如果文档包含具有负对比度的VML图像,它们将以与MS Word相同的方式呈现,而不会导致异常。
  • 修正了渲染DML图表时数据标签和序列值关联不正确的错误。
  • 修正了渲染时计算散点图x值的错误。
  • 修正了渲染DML图表时继承数据标签(字体大小)段落属性的错误。
  • 修正了渲染DML图表时剪切用户形状文本的错误。

具体更新内容

key 概述 类别
WORDSJAVA-1989 当外部tiff图像库(JAI)不可用时,使用内部TIFFImageWriter。 新功能
WORDSJAVA-2111 对于FIPS模式下的非FIPS操作,清除FipsUnapprovedOperationException。 新功能
WORDSJAVA-2122 选择调用HarfBuzz库(仅在Windows上)以获得更好的字距调整。 新功能
WORDSJAVA-2126 更新和改进API示例。 新功能
WORDSJAVA-2137 在公共Aspose下载站点上分离Aspose.Words jdk16.jar。 新功能
WORDSJAVA-2149 在Java 12上检查Aspose.Words for Java。 新功能
WORDSJAVA-2154 新的干净的第三方直接从内部FOSS数据库许可PDF文件。 新功能
WORDSNET-18808 分析在docker(Linux)中使用图像转换文档所需的内容 新功能
WORDSNET-2261 渲染/转换为PDF时忽略字距调整选项 新功能
WORDSJAVA-2093 在Java 1.6运行时加载Aspose.Words时会引发异常 Bug修复
WORDSJAVA-2138 将RTF保存为PDF时抛出java.lang.OutOfMemoryError Bug修复

· · · · · ·

更多更新细则请参考:【Aspose.Words for Java v19.8更新说明】

公共API更改示例详解

▲实现了一个选项,允许指定是否使用文档的原始版本或修订版本

添加了新的公开枚举:

////// Allows to specify whether to work with the original or revised version of a document.///public enum RevisionsView

在Document类中添加了新的公共选项:

////// Gets or sets a value indicating whether to work with the original or revised version of a document.///////// The default value is .///public RevisionsView RevisionsView

如何访问文档的修订版本:

Document doc = new Document(@"test.docx");doc.UpdateListLabels();  // Switch to the revised version of the document.doc.RevisionsView = RevisionsView.Final;  foreach (Revision revision in doc.Revisions){    if (revision.ParentNode.NodeType == NodeType.Paragraph)    {        Paragraph paragraph = (Paragraph)revision.ParentNode;        if (paragraph.IsListItem)        {            // Print revised version of LabelString and ListLevel.            Console.WriteLine(paragraph.ListLabel.LabelString);            Console.WriteLine(paragraph.ListFormat.ListLevel);        }    }}
▲WORDSNET-18600 – 实现API以定义图表系列数据标签的默认选项

ChartDataLabelCollection类中添加了以下新公共属性:

////// Allows to specify whether category name is to be displayed for the data labels of the entire series./// Default value is false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowCategoryName { get; set; }  ////// Allows to specify whether bubble size is to be displayed for the data labels of the entire series./// Applies only to Bubble charts. /// Default value is false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowBubbleSize { get; set; }  ////// Allows to specify whether legend key is to be displayed for the data labels of the entire series./// Default value is false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowLegendKey { get; set; }  ////// Allows to specify whether percentage value is to be displayed for the data labels of the entire series./// Default value is false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowPercentage { get; set; }  ////// Returns or sets a Boolean to indicate the series name display behavior for the data labels of the entire series./// True to show the series name. False to hide. By default false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowSeriesName { get; set; }  ////// Allows to specify whether values are to be displayed in the data labels of the entire series./// Default value is false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowValue { get; set; }  ////// Allows to specify whether data label leader lines need be shown for the data labels of the entire series./// Default value is false./////////Applies to Pie charts only. /// Leader lines create a visual connection between a data label and its corresponding data point.///Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowLeaderLines { get; set; }  ////// Allows to specify whether values from data labels range to be displayed in the data labels of the entire series./// Default value is false.///////// Value defined for this property can be overridden for an individual data label with using the///property.///public bool ShowDataLabelsRange { get; set; }  ////// Gets or sets string separator used for the data labels of the entire series. /// The default is a comma, except for pie charts showing only category name and percentage, when a line break /// shall be used instead. ///////// Value defined for this property can be overridden for an individual data label with using the///property.///public string Separator { get; set; }  ////// Gets aninstance allowing to set number format for the data labels of the/// entire series.///public ChartNumberFormat NumberFormat { get; set; }

使用案例:

Document doc = new Document();DocumentBuilder builder = new DocumentBuilder(doc);  Shape shape = builder.InsertChart(ChartType.Pie, 432, 252);Chart chart = shape.Chart;chart.Series.Clear();  ChartSeries series = chart.Series.Add("Series 1",     new string[] { "Category1", "Category2", "Category3" },     new double[] { 2.7, 3.2, 0.8 });  ChartDataLabelCollection labels = series.DataLabels;labels.ShowPercentage = true;labels.ShowValue = true;labels.ShowLeaderLines = false;labels.Separator = " - ";  doc.Save(dir + "Demo.docx");


*Aspose.Words现已加入“8月省钱式嗨购”,满额即送office 365正版授权,想要购买Aspose.Words正版授权的朋友可咨询在线客服了解详情哦~


ASPOSE技术交流QQ群()已开通,各类资源及时分享,欢迎交流讨论!

标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年7月19日
下一篇 2019年7月19日

相关推荐

发表回复

登录后才能评论