原創|行業資訊|編輯:李顯亮|2021-04-06 09:55:41.140|閱讀 234 次
概述:Aspose.Words for .Net更新至新版本v21.4,此常規的每月版本中有95項改進和修復,包括添加了刪除未使用的內置樣式的功能、擴展了結構化文檔標簽范圍的公共API等新功能,歡迎下載體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級Word文檔處理API,用于執行各種文檔管理和操作任務。API支持生成,修改,轉換,呈現和打印文檔,而無需在跨平臺應用程序中直接使用Microsoft Word。2021年4月更新來啦,.NET版Aspose.Words更新至v21.4新版本!
主要特點如下:
>>你可以點擊這里下載Aspose.Words for .NET v21.4測試體驗。
關鍵序號 | 概括 | 類別 |
WORDSNET-21246 | 在StructuredDocumentTagRangeStart類中提供更多屬性/方法 | 新功能 |
WORDSNET-21991 | 在SkiaSharp圖像渲染器中支持高級排版 | 新功能 |
WORDSNET-5643 | 在保存為流格式時,考慮提供一種保存用戶指定頁面范圍的方法 | 增強功能 |
WORDSNET-20580 | 改進HTML列表編寫器中的列表項填充模擬 | 增強功能 |
WORDSNET-21597 | 為DML形狀添加“ IsDecorative”標志 | 增強功能 |
WORDSNET-3449 | 改善對大文件的支持 | 增強功能 |
完整更新細則請參考:【Aspose.Words for .NET v21.4更新說明】
使用GDI +或SkiaSharp保存到圖像時(即在所有.NET平臺和.NET Standard上),現在支持高級字體。用例:使用高級排版功能將文檔保存到圖像。
Document doc = new Document("input.docx"); doc.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance; doc.Save("output.png");
將以下新的公共方法添加到Fill類中:
用例:說明如何將填充更改為實體。
// 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類的構造函數已公開。現在可以手動創建這些類的實例。
用例:
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的全部完整功能,可 聯系在線客服獲取30天臨時授權體驗。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn