原創(chuàng)|產(chǎn)品更新|編輯:李顯亮|2020-12-07 09:52:11.300|閱讀 267 次
概述:Aspose.Words for .Net更新至新版本v20.12,此常規(guī)的每月版本中有107項(xiàng)改進(jìn)和修復(fù),實(shí)現(xiàn)與.NET 5.0一起使用,歡迎下載體驗(yàn)。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級(jí)Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無需在跨平臺(tái)應(yīng)用程序中直接使用Microsoft Word。2020年最后一次更新來啦,.NET版Aspose.Words更新至v20.12新版本!
主要特點(diǎn)如下:
>>你可以點(diǎn)擊這里下載Aspose.Words for .NET v20.12測(cè)試體驗(yàn)。(安裝包僅提供部分功能,并設(shè)置限制,如需試用完整功能請(qǐng))
序號(hào) | 概要 | 類別 |
WORDSNET-16895 | 添加功能以使用DOM插入樣式分隔符 | 新功能 |
WORDSNET-20552 | LINQ Reporting Engine-提供一種從動(dòng)態(tài)插入的文檔中導(dǎo)入樣式的方法 | 新功能 |
WORDSNET-18827 | 添加選項(xiàng)以在加載文檔時(shí)執(zhí)行內(nèi)存優(yōu)化 | 新功能 |
WORDSNET-21432 | 檢查Aspose.Words for .NET Standard是否可與.NET 5.0一起使用 | 新功能 |
WORDSNET-21102 | 添加功能以將插入的SVG導(dǎo)出為媒體文件夾中的SVG | 新功能 |
WORDSNET-21441 | 提供對(duì)常見的StructuredDocumentRangeStart屬性的訪問 | 新功能 |
WORDSNET-11665 | 宏更好的支持,包括讀取/添加/刪除/導(dǎo)入/編輯 | 新功能 |
WORDSNET-18804 | 應(yīng)該考慮dataLabel extLst中的ManualLayout設(shè)置 | 增強(qiáng)功能 |
WORDSNET-3863 | 考慮公開FontAttr.SpecialHidden屬性 | 增強(qiáng)功能 |
WORDSNET-12430 | 在轉(zhuǎn)換的DOCX中未激活單詞拼寫檢查器 | 增強(qiáng)功能 |
WORDSNET-14063 | ODT到PDF的轉(zhuǎn)換與表的呈現(xiàn)有關(guān) | 增強(qiáng)功能 |
完整更新細(xì)則請(qǐng)參考:【Aspose.Words for .NET v20.12更新說明】
添加了一個(gè)新的公共屬性SaveOptions.AllowEmbeddingPostScriptFonts:
用例:
const string testDir = "\\TestDir\\"; Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); // Create some content that will use PostScript font. builder.Font.Name = "PostScriptFont"; builder.Writeln("Some text with PostScript font."); // Load the font with PostScript to use in the document. FontSourceBase otf = new MemoryFontSource(File.ReadAllBytes(testDir + "PostScriptFont.otf")); FontSourceBase[] sources = new FontSourceBase[] {otf}; doc.FontSettings = new FontSettings(); doc.FontSettings.SetFontsSources(sources); // Embed TrueType fonts. doc.FontInfos.EmbedTrueTypeFonts = true; // Allow embedding PostScript fonts while embedding TrueType fonts. SaveOptions saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Docx); saveOptions.AllowEmbeddingPostScriptFonts = true; // Save document with embedded PostScript font. doc.Save(testDir + "out.docx", saveOptions);
插入SVG時(shí),我們更改了DocumentBuilder.InsertImage行為。較早的Aspose.Words將SVG插入為EMF圖元文件,以使插入的圖像保持在矢量表示中。現(xiàn)在,AW將SVG插入為帶有svgBlip擴(kuò)展名的PNG,其中包含原始SVG圖像,就像MS Word一樣。
用例1:SVG圖像以svgBlip擴(kuò)展名的PNG格式插入到文檔中,其中包含原始矢量SVG圖像表示形式。
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.InsertImage("test.svg"); doc.Save("out.docx");
用例2:像MS Word一樣,SVG圖像以PNG格式保存到輸出文檔。
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.InsertImage("test.svg"); doc.Save("out.doc");
用例3:使用OptimizeFor方法針對(duì)舊版本的MS Word優(yōu)化了文檔。SVG作為EMF圖元文件插入文檔中,以使圖像保持矢量表示形式(舊的Aspose.Word行為)。
Document doc = new Document(); doc.CompatibilityOptions.OptimizeFor(Settings.MsWordVersion.Word2003); DocumentBuilder builder = new DocumentBuilder(doc); builder.InsertImage("test.svg"); doc.Save("out.doc");
實(shí)現(xiàn)了條件評(píng)估的擴(kuò)展點(diǎn)。這使用戶可以對(duì)IF和COMPARE字段實(shí)施自定義評(píng)估。
用例:
public class ComparisonExpressionEvaluator : IComparisonExpressionEvaluator { public ComparisonExpressionEvaluator(ComparisonEvaluationResult result) { mResult = result; } public ComparisonEvaluationResult Evaluate(Field field, ComparisonExpression expresion) { return mResult; } private readonly ComparisonEvaluationResult mResult; } ComparisonEvaluationResult result = new ComparisonEvaluationResult(true); ComparisonExpressionEvaluator evaluator = new ComparisonExpressionEvaluator(result); document.FieldOptions.ComparisonExpressionEvaluator = evaluator;
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn