原創(chuàng)|產(chǎn)品更新|編輯:李顯亮|2021-03-08 10:03:23.350|閱讀 349 次
概述:Aspose.Words for .Net更新至新版本v21.3,此常規(guī)的每月版本中有90項改進和修復(fù),包括新添擴展字體API,新添LINQ Reporting Engine支持的Select和SelectMany擴展方法等新功能,歡迎下載體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無需在跨平臺應(yīng)用程序中直接使用Microsoft Word。2021年3月更新來啦,.NET版Aspose.Words更新至v21.3新版本!
主要特點如下:
>>你可以點擊這里下載Aspose.Words for .NET v21.3測試體驗。
序號 | 概括 | 類別 |
WORDSNET-7788 | 支持Font.Fill屬性,并在API中提供公共成員 | 新功能 |
WORDSNET-17851 | LINQ報表引擎——支持選擇擴展方法 | 新功能 |
WORDSNET-18173 | 實現(xiàn)MERGESEQ領(lǐng)域的全部功能 | 新功能 |
WORDSNET-12810 | 提供bool FontSettings.SetFontsFolder重載 | 新功能 |
WORDSNET-20554 | 支持LINQ報表引擎雙向同時動態(tài)合并單元格 | 新功能 |
WORDSNET-21425 | LINQ 報表引擎--支持SelectMany擴展方法 | 新功能 |
WORDSNET-21189 | 增加獲取StructuredocumentTagRangeStart內(nèi)容的功能 | 新功能 |
WORDSNET-21785 | 從樣式庫中刪除樣式 | 新功能 |
WORDSNET-9676 | Node.NextSibling的錯誤結(jié)果 | 增強功能 |
完整更新細則請參考:【Aspose.Words for .NET v21.3更新說明】
現(xiàn)在,不僅可以從ShapeBase中訪問Fill屬性,還可以從Font對象中訪問該屬性:
此外,以下新的公共屬性已添加到Fill類中:
此外,以下新的公共枚舉已添加到Aspose.Words.Drawing命名空間中:
用例如下:
// Open some document with text effects. const string myDir = @"example\"; Document doc = new Document(myDir + "TextTwoColorGradient.docx"); // Get Fill object for Font of the first Run. Fill fill = doc.FirstSection.Body.FirstParagraph.Runs[0].Font.Fill; // Check Fill properties of the Font. Console.WriteLine("The type of the fill is: {0}", fill.FillType); Console.WriteLine("It is{0} visible.", fill.Visible ? "" : " not"); Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor); Console.WriteLine("The background color of the fill is: {0}", fill.BackColor); Console.WriteLine("The fill is transparent at {0}%", fill.Transparency * 100); Console.WriteLine("Note the opacity is opposite to transparency and has value: {0}%", fill.Opacity * 100); // You can change, for example, the foreground color. fill.ForeColor = Color.Yellow; // Or even make it invisible. fill.Visible = false; // But let's make it visible again with foreground color Red. fill.ForeColor = Color.Green; // Note, it now has Solid type with 100% opacity. Console.WriteLine("\nThe fill is changed:"); Console.WriteLine("The type of the fill is: {0}", fill.FillType); Console.WriteLine("The foreground color of the fill is: {0}", fill.ForeColor); Console.WriteLine("The fill opacity is {0}%", fill.Opacity * 100); // Let's also change the transparency. fill.Transparency = 0.25; Console.WriteLine("\nThe fill is changed once again:"); Console.WriteLine("The fill transparency is {0}%", fill.Transparency * 100); doc.Save(myDir + "TextTwoColorGradient Out.docx"); /* This code example produces the following results: The type of the fill is: Gradient It is visible. The foreground color of the fill is: Color [A=255, R=128, G=0, B=0] The background color of the fill is: Color [A=255, R=0, G=0, B=0] The fill is transparent at 16% Note the opacity is opposite to transparency and has value: 84% The fill is changed: The type of the fill is: Solid The foreground color of the fill is: Color [A=255, R=0, G=128, B=0] The fill opacity is 100% The fill is changed once again: The fill transparency is 25% */
以下公共屬性已添加到StructuredDocumentTagRangeStart類:
以下公共方法已添加到StructuredDocumentTagRangeStart類中:
這些更改允許枚舉范圍化結(jié)構(gòu)化文檔標(biāo)簽的子節(jié)點。為了客戶方便,功能遵循CompositeNode模式并返回實時集合。
用例:說明如何使用StructuredDocumentTagRangeStart的子節(jié)點
Document doc = new Document("document-containing-ranged-structured-document-tag"); StructuredDocumentTagRangeStart tag = (StructuredDocumentTagRangeStart)doc.FirstSection.Body.FirstChild; Console.WriteLine(tag.ChildNodes.Count); foreach(Node node in tag.ChildNodes) Console.WriteLine(node.NodeType); foreach(Node node in tag.GetChildNodes(NodeType.Run, true)) Console.WriteLine(node.GetText());+
以下公共屬性已添加到FontSourceBase類:
用例:
FontSettings settings = new FontSettings(); settings.SetFontsFolder("bad folder?", false); FontSourceBase source = settings.GetFontsSources()[0]; IWarningCallback wc = new CustomWarningCallback(); source.WarningCallback = wc; IListfontInfos = source.GetAvailableFonts(); Console.WriteLine((wc as IList)[0].Description);
輸出如下:
Error loading font from the folder "bad folder?": Illegal characters in path.
如果你想試用Aspose的全部完整功能,可 聯(lián)系在線客服獲取30天臨時授權(quán)體驗。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn