原創(chuàng)|產(chǎn)品更新|編輯:李顯亮|2020-12-11 13:56:52.673|閱讀 492 次
概述:Aspose.Words for Java更新至新版本v20.12,此常規(guī)的每月版本中,116項(xiàng)改進(jìn)和修復(fù),一起來(lái)看看吧!
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
隨著.NET版Aspose.Words for .Net v20.12的發(fā)布,Java版也隨之更新,除了一些通用功能外,也獨(dú)有新改善。
Aspose.Words for Java是一種高級(jí)Java Word處理API,使您可以直接在Java應(yīng)用程序中執(zhí)行各種文檔處理任務(wù),無(wú)需Microsoft Word即可生成,修改和轉(zhuǎn)換文檔。
主要特點(diǎn)如下:
>>你可以點(diǎn)擊這里下載Aspose.Words for Java v20.12測(cè)試體驗(yàn)。
鍵 | 概要 | 類別 |
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ì)常見(jiàn)的StructuredDocumentRangeStart屬性的訪問(wèn) | 新功能 |
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中未激活WORDSNET拼寫檢查器 | 增強(qiáng)功能 |
WORDSNET-14063 | ODT到PDF的轉(zhuǎn)換與表的呈現(xiàn)有關(guān) | 增強(qiáng)功能 |
WORDSJAVA-1937 | SVG圓形和方形 | Bug修復(fù) |
WORDSJAVA-2105 | 在SVG圓形蓋中實(shí)現(xiàn)重疊的破折號(hào)線段。 | Bug修復(fù) |
WORDSJAVA-2107 | 移除SVG儀表板蓋中的尾部?jī)x表板段。 | Bug修復(fù) |
WORDSJAVA-2234 | /高級(jí)字體/ DOCM到迪拜字體的PDF轉(zhuǎn)換問(wèn)題 | Bug修復(fù) |
WORDSJAVA-2438 | 某些字符未呈現(xiàn)或?qū)挾炔徽_(Harfbuzz) | Bug修復(fù) |
WORDSJAVA-2459 | / harfbuzz +特定于Java /阿拉伯語(yǔ)WORDSNET和字體的部分呈現(xiàn)在PDF格式中不正確 | Bug修復(fù) |
WORDSJAVA-2491 | 無(wú)法從DOCX讀取表格樣式頁(yè)邊距 | Bug修復(fù) |
WORDSJAVA-2494 | StreamFontSource無(wú)法擴(kuò)展。 | Bug修復(fù) |
WORDSJAVA-2495 | Javadoc是在某些Maven環(huán)境中自動(dòng)加載的。 | Bug修復(fù) |
添加了一個(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