原創(chuàng)|行業(yè)資訊|編輯:李顯亮|2021-04-06 09:55:41.140|閱讀 234 次
概述:Aspose.Words for .Net更新至新版本v21.4,此常規(guī)的每月版本中有95項(xiàng)改進(jìn)和修復(fù),包括添加了刪除未使用的內(nèi)置樣式的功能、擴(kuò)展了結(jié)構(gòu)化文檔標(biāo)簽范圍的公共API等新功能,歡迎下載體驗(yàn)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級(jí)Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無(wú)需在跨平臺(tái)應(yīng)用程序中直接使用Microsoft Word。2021年4月更新來(lái)啦,.NET版Aspose.Words更新至v21.4新版本!
主要特點(diǎn)如下:
>>你可以點(diǎn)擊這里下載Aspose.Words for .NET v21.4測(cè)試體驗(yàn)。
關(guān)鍵序號(hào) | 概括 | 類別 |
WORDSNET-21246 | 在StructuredDocumentTagRangeStart類中提供更多屬性/方法 | 新功能 |
WORDSNET-21991 | 在SkiaSharp圖像渲染器中支持高級(jí)排版 | 新功能 |
WORDSNET-5643 | 在保存為流格式時(shí),考慮提供一種保存用戶指定頁(yè)面范圍的方法 | 增強(qiáng)功能 |
WORDSNET-20580 | 改進(jìn)HTML列表編寫器中的列表項(xiàng)填充模擬 | 增強(qiáng)功能 |
WORDSNET-21597 | 為DML形狀添加“ IsDecorative”標(biāo)志 | 增強(qiáng)功能 |
WORDSNET-3449 | 改善對(duì)大文件的支持 | 增強(qiáng)功能 |
完整更新細(xì)則請(qǐng)參考:【Aspose.Words for .NET v21.4更新說(shuō)明】
使用GDI +或SkiaSharp保存到圖像時(shí)(即在所有.NET平臺(tái)和.NET Standard上),現(xiàn)在支持高級(jí)字體。用例:使用高級(jí)排版功能將文檔保存到圖像。
Document doc = new Document("input.docx"); doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance; doc.Save("output.png");
將以下新的公共方法添加到Fill類中:
用例:說(shuō)明如何將填充更改為實(shí)體。
// Open some document with text effects. Document doc = new Document("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("The foreground color of the fill is: {0}", fill.ForeColor); Console.WriteLine("The fill is transparent at {0}%", fill.Transparency * 100); // Change type of the fill to Solid with uniform green color. fill.Solid(Color.Green); 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 transparency is {0}%", fill.Transparency * 100); doc.Save("TextSolidOut.docx"); /* This code example produces the following results: The type of the fill is: Gradient The foreground color of the fill is: Color [A=255, R=0, G=128, B=128] The fill is transparent at 65% 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 transparency is 0% */
StructuredDocumentTagRangeStart和StructuredDocumentTagRangeEnd類的構(gòu)造函數(shù)已公開。現(xiàn)在可以手動(dòng)創(chuàng)建這些類的實(shí)例。
用例:
Document doc = new Document("input.docx"); StructuredDocumentTagRangeStart start = new StructuredDocumentTagRangeStart(doc, SdtType.RepeatingSectionItem); StructuredDocumentTagRangeEnd end = new StructuredDocumentTagRangeEnd(doc, start.Id); doc.FirstSection.Body.InsertAfter(start, doc.FirstSection.Body.FirstParagraph); doc.LastSection.Body.InsertBefore(end, doc.LastSection.Body.LastParagraph); doc.Save("output.docx"); IEnumerable interface is implemented in StructuredDocumentTagRangeStart class for full LINQ support (i.e. Last(), LastOrDefault() and other methods). Document doc = new Document("input.docx"); StructuredDocumentTagRangeStart start = (StructuredDocumentTagRangeStart)doc.FirstSection.Body.GetChild(NodeType.StructuredDocumentTagRangeStart, 0, false); Console.WriteLine(start.LastOrDefault().GetText());
如果你想試用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