原創(chuàng)|產(chǎn)品更新|編輯:李顯亮|2021-03-08 10:03:23.350|閱讀 349 次
概述:Aspose.Words for .Net更新至新版本v21.3,此常規(guī)的每月版本中有90項(xiàng)改進(jìn)和修復(fù),包括新添擴(kuò)展字體API,新添LINQ Reporting Engine支持的Select和SelectMany擴(kuò)展方法等新功能,歡迎下載體驗(yàn)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門(mén)軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級(jí)Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無(wú)需在跨平臺(tái)應(yīng)用程序中直接使用Microsoft Word。2021年3月更新來(lái)啦,.NET版Aspose.Words更新至v21.3新版本!
主要特點(diǎn)如下:
>>你可以點(diǎn)擊這里下載Aspose.Words for .NET v21.3測(cè)試體驗(yàn)。
序號(hào) | 概括 | 類別 |
WORDSNET-7788 | 支持Font.Fill屬性,并在API中提供公共成員 | 新功能 |
WORDSNET-17851 | LINQ報(bào)表引擎——支持選擇擴(kuò)展方法 | 新功能 |
WORDSNET-18173 | 實(shí)現(xiàn)MERGESEQ領(lǐng)域的全部功能 | 新功能 |
WORDSNET-12810 | 提供bool FontSettings.SetFontsFolder重載 | 新功能 |
WORDSNET-20554 | 支持LINQ報(bào)表引擎雙向同時(shí)動(dòng)態(tài)合并單元格 | 新功能 |
WORDSNET-21425 | LINQ 報(bào)表引擎--支持SelectMany擴(kuò)展方法 | 新功能 |
WORDSNET-21189 | 增加獲取StructuredocumentTagRangeStart內(nèi)容的功能 | 新功能 |
WORDSNET-21785 | 從樣式庫(kù)中刪除樣式 | 新功能 |
WORDSNET-9676 | Node.NextSibling的錯(cuò)誤結(jié)果 | 增強(qiáng)功能 |
完整更新細(xì)則請(qǐng)參考:【Aspose.Words for .NET v21.3更新說(shuō)明】
現(xiàn)在,不僅可以從ShapeBase中訪問(wèn)Fill屬性,還可以從Font對(duì)象中訪問(wèn)該屬性:
此外,以下新的公共屬性已添加到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é)點(diǎn)。為了客戶方便,功能遵循CompositeNode模式并返回實(shí)時(shí)集合。
用例:說(shuō)明如何使用StructuredDocumentTagRangeStart的子節(jié)點(diǎn)
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天臨時(shí)授權(quán)體驗(yàn)。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn