Aspose.Words for .NET v19.8最新版功能亮点:允许指定是否使用文档原始版或修订版

Aspose.Words for .Net更新至新版本v19.8,新增分析在docker(Linux)中使用图像转换文档所需的内容功能,以及渲染/转换为PDF时忽略字距调整选项,修复多项Bug,我们一起来看一看新功能详解吧!

Aspose.Words for .NET是用于执行各种文档管理和操作任务,支持生成,修改,转换,呈现和打印文档,而无需在跨平台应用程序中直接使用Microsoft Word。同时支持所有流行的Word处理文件格式,并允许将Word文档导出或转换为固定布局文件格式和最常用的图像、多媒体格式。

Aspose.Words for .Net更新至新版本v19.8,新增分析在docker(Linux)中使用图像转换文档所需的内容功能,以及渲染/转换为PDF时忽略字距调整选项,修复多项Bug,我们一起来看一看新功能详解吧!>>欢迎下载Aspose.Words for .NET v19.8体验

主要特点

  • 实现了一个选项,该选项允许指定是否使用文档的原始版本还是修订版。
  • 实现API来定义图表系列数据标签的默认选项。
  • 固定的对角线边界渲染是垂直合并的单元格。
  • 修正了当“keep with next”应用于表格单元格的最后一段时出现的问题。
  • 改进了表格中亚洲文本段落度量的计算。
  • 改进的代理对处理。
  • 修正了负对比度图像渲染的问题。现在,如果文档包含具有负对比度的VML图像,它们将以与MS Word相同的方式呈现,而不会导致异常。
  • 修正了渲染DML图表时数据标签和序列值关联不正确的错误。
  • 修正了渲染时计算散点图x值的错误。
  • 修正了渲染DML图表时继承数据标签(字体大小)段落属性的错误。
  • 修正了渲染DML图表时剪切用户形状文本的错误。


新增与改善

key 概述 类别
WORDSNET-18808 分析在docker(Linux)中使用图像转换文档所需的内容 新功能
WORDSNET-2261 渲染/转换为PDF时忽略字距调整选项 新功能
WORDSNET-18864 Iskoola Pota和Latha字体渲染问题 Bug修复
WORDSNET-18561 输出PDF中缺少图表的轴 Bug修复
WORDSNET-18691 在word文档中存在格式化问题,在将政策写入转换为pdf后,文本变为粗体 Bug修复
WORDSNET-18875 插入标题时文档格式已更改 Bug修复
WORDSNET-18510 使用公式呈现的DOCX到HTML转换问题 Bug修复
WORDSNET-18511 具有分页位置的DOCX到HTML转换问题 Bug修复
WORDSNET-18513 将DOCX转换为PDF时无限循环异常 Bug修复
WORDSNET-18895 导出为HTML后,段落的格式不正确 Bug修复
WORDSNET-18894 导出为HTML后,段落的格式不正确 Bug修复

· · · · · ·

完整更新细则请参考:【Aspose.Words for .NET 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群()已开通,各类资源及时分享,欢迎交流讨论!

1565166511625_12201A8E-ADC2-4723-A4C7-A25BEBC0575B(1).png

标签:

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

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

相关推荐

发表回复

登录后才能评论