原創|產品更新|編輯:李顯亮|2019-08-23 15:22:06.853|閱讀 629 次
概述:Aspose.Words for Java更新至最新版v19.8,選擇調用HarfBuzz庫(僅在Windows上)以獲得更好的字距調整Aspose.Words for Java在Java 12上進行了測試,我們一起來看一看新功能詳解吧!
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
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體驗
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更新說明】
添加了新的公開枚舉:
////// 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); } } }
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群(642018183)已開通,各類資源及時分享,歡迎交流討論!
掃描關注“慧聚IT”微信公眾號,及時獲取更多產品最新動態及最新資訊
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn