原創|產品更新|編輯:李顯亮|2021-01-05 10:40:13.727|閱讀 526 次
概述:Aspose.Words for .Net更新至新版本v21.1,此常規的每月版本中有78項改進和修復, 支持OOXML SmartArt(圖表)的“冷”渲染 ,添加創建移動修訂功能等,歡迎下載體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級Word文檔處理API,用于執行各種文檔管理和操作任務。API支持生成,修改,轉換,呈現和打印文檔,而無需在跨平臺應用程序中直接使用Microsoft Word。2021年第一版更新來啦,.NET版Aspose.Words更新至v21.1新版本!
主要特點如下:
>>你可以點擊這里下載Aspose.Words for .NET v21.1測試體驗。
鍵 | 概要 | 類別 |
WORDSNET-4987 | 支持OOXML SmartArt(圖表)的“冷”渲染 | 新功能 |
WORDSNET-20666 | 添加功能以創建移動修訂 | 新功能 |
WORDSNET-21389 | 將IImageSavingCallback添加到MarkdownSaveOptions中 | 新功能 |
WORDSNET-17026 | LINQ Reporting Engine-支持部分打破了數據帶和條件塊的內部 | 新功能 |
WORDSNET-20367 | 向Node類添加字段,以便用戶可以在Aspose.Words文檔模型中存儲一些自定義元數據 | 新功能 |
WORDSNET-18882 | 添加功能以將表的列添加為書簽 | 新功能 |
WORDSNET-21114 | 添加功能以使用TableStyle獲取或設置單元格垂直對齊方式 | 新功能 |
WORDSNET-21426 | MS Word應自動選擇插入的OLE對象的默認圖標 | 增強功能 |
WORDSNET-21576 | 將LastChild屬性和AppendChild()方法添加到StructuredDocumentRangeStart類 | 增強功能 |
WORDSNET-21433 | 改進URI處理以處理相對超鏈接 | 增強功能 |
WORDSNET-21493 | 在父子層次結構中將Word轉換為JSON | 增強功能 |
完整更新細則請參考:【Aspose.Words for .NET v21.1更新說明】
客戶現在可以跟蹤模型樹中的節點位置,并根據分配的標識符綁定外部數據,用例如下:
DocumentBuilder builder = new DocumentBuilder(); Shape shape = builder.InsertShape(ShapeType.Rectangle, 100, 100); shape.CustomNodeId = 100;
該選項允許設置表格樣式單元格的垂直對齊方式,用例如下:
Document doc = TestUtil.Open(fileName); TableStyle style = (TableStyle)doc.Styles\["Custom Table 1"\]; style.VerticalAlignment = CellVerticalAlignment.Center;
說明將文檔保存為Markdown格式時如何使用“ MarkdownSaveOptions.ImageSavingCallback”
public void HandleDocument() { const string outFileName = "SavingCallback.DocumentParts.Rendering.md"; // Open a document to be converted to Markdown. Document doc = new Document("C:\\Rendering.docx"); // We can use an appropriate SaveOptions subclass to customize the conversion process. MarkdownSaveOptions options = new MarkdownSaveOptions(); // If we convert a document that contains images into Markdown, we will end up with one Markdown file which links to several images. // Each image will be in the form of a file in the local file system. // There is also a callback that can customize the name and file system location of each image. options.ImageSavingCallback = new SavedImageRename(outFileName); // The ImageSaving() method of our callback will be run at this time. doc.Save($"C:\\{outFileName}", options); } /// <summary> /// Renames saved images that are produced when an Markdown document is saved. /// </summary> public class SavedImageRename : IImageSavingCallback { public SavedImageRename(string outFileName) { mOutFileName = outFileName; } void IImageSavingCallback.ImageSaving(ImageSavingArgs args) { string imageFileName = $"{mOutFileName} shape {++mCount}, of type {args.CurrentShape.ShapeType}{Path.GetExtension(args.ImageFileName)}"; args.ImageFileName = imageFileName; args.ImageStream = new FileStream($"C:\\{imageFileName}", FileMode.Create); Assert.True(args.ImageStream.CanWrite); Assert.True(args.IsImageAvailable); Assert.False(args.KeepImageStreamOpen); } private int mCount; private readonly string mOutFileName; }
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn