原創(chuàng)|產(chǎn)品更新|編輯:李顯亮|2021-06-07 10:03:22.753|閱讀 105 次
概述:Aspose.Words for .Net更新至新版本v21.6,此常規(guī)的每月版本中有98項改進(jìn)和修復(fù),包括引入了用于處理紋理的新 API,圖表系列、數(shù)據(jù)點(diǎn)和標(biāo)記設(shè)置填充和描邊格式等新功能,歡迎下載體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
Aspose.Words for .Net是一種高級Word文檔處理API,用于執(zhí)行各種文檔管理和操作任務(wù)。API支持生成,修改,轉(zhuǎn)換,呈現(xiàn)和打印文檔,而無需在跨平臺應(yīng)用程序中直接使用Microsoft Word。2021年6月更新來啦,.NET版Aspose.Words更新至v21.6新版本!
主要特點(diǎn)如下:
>>你可以點(diǎn)擊這里下載Aspose.Words for .NET v21.6測試體驗。
序號 | 概括 | 類別 |
WORDSNET-21647 | DOCX 轉(zhuǎn) PDF:發(fā)生內(nèi)容置換 | 新功能 |
WORDSNET-12748 | 提供API更改圖表類別系列顏色 | 新功能 |
WORDSNET-13907 | 支持渲染 DrawingML InkML ContentPart | 新功能 |
WORDSNET-12275 | 添加功能以更改 ChartSeries 的顏色 | 新功能 |
WORDSNET-21847 | 未應(yīng)用高級 OpenType 字體功能 | 新功能 |
WORDSNET-21871 | 添加功能以創(chuàng)建帶線條的散點(diǎn)圖 | 新功能 |
WORDSNET-22070 | 提供始終為 LINQ 報告引擎的 XML 根元素生成對象的選項 | 新功能 |
WORDSNET-12529 | 添加功能以獲取/設(shè)置亞洲字符間距屬性 | 新功能 |
WORDSNET-22082 | storeItemChecksum 獲取/設(shè)置方法 | 新功能 |
WORDSNET-22002 | 實(shí)現(xiàn) Fill.PresetTextured() 方法 | 新功能 |
WORDSNET-20023 | 允許更改餅圖顏色 | 新功能 |
WORDSNET-21972 | 提供始終為 LINQ 報告引擎的 JSON 根元素生成對象的選項 | 新功能 |
WORDSNET-15201 | 為帶有腳注的連續(xù)部分實(shí)施 MS Word 2013 行為 | 新功能 |
WORDSNET-17510 | Aspose.Words 不模仿 MS Word 的文檔結(jié)構(gòu)標(biāo)簽 | 增強(qiáng) |
WORDSNET-18186 | 從 Word 到 PDF 的轉(zhuǎn)換過程中丟失了墨跡注釋 | 增強(qiáng) |
WORDSNET-20020 | 轉(zhuǎn)換后的 Word 文檔的透明度未顯示在 PDF 中 | 增強(qiáng) |
WORDSNET-12640 | 添加設(shè)置/獲取圖表系列顏色的功能 | 增強(qiáng) |
WORDSNET-20462 | DOCX轉(zhuǎn)PDF后手寫內(nèi)容丟失 | 增強(qiáng) |
WORDSNET-21156 | LayoutCollector 返回的值不正確 | 增強(qiáng) |
WORDSNET-19199 | 帶有免費(fèi)手繪圖像的 DOCX 到 PDF | 增強(qiáng) |
WORDSNET-22090 | TXT 文件中的每一行都應(yīng)該有一個固定長度的字符 | 行中允許的最大字符數(shù) | 增強(qiáng) |
WORDSNET-21795 | DOCX 到 PDF/A 的轉(zhuǎn)換和驗證失敗:標(biāo)題內(nèi)的單詞/空格分隔問題 | 增強(qiáng) |
完整更新細(xì)則請參考:【Aspose.Words for .NET v21.6更新說明】
公共枚舉 LayoutEntityType 中添加了一個新值Note:
這將幫助用戶迭代腳注/尾注容器內(nèi)的注釋。用例如下:
Document doc = new Document("SomeDocument.docx") LayoutEnumerator en = new LayoutEnumerator(doc); // We start from the first page. Debug.Assert(en.Type == LayoutEntityType.Page); // Move to the first column on the page. en.MoveFirstChild(); Debug.Assert(en.Type == LayoutEntityType.Column); // Move to the first child in the column. en.MoveFirstChild(); do { // Iterate to a footnote container. if (en.Type == LayoutEntityType.Footnote) break; } while(en.MoveNext()); // If the footnote container exists in the column, we will process notes. if (en.Type == LayoutEntityType.Footnote) { // Move to the first note in the footnote container. if (en.MoveFirstChild()) { do { // Move over notes inside the footnote container. Debug.Assert(en.Type == LayoutEntityType.Note); // Do something. } while (en.MoveNext()); } } }
LayoutEnumerator 類的新 Kind 枚舉值 LayoutEnumerator 類添加了 8 個新的 Kind 枚舉值:
最有用的值是能夠明確地確定你正在使用的分隔符類型的那種。這是真的,因為對于所有類型的分隔符,LayoutEntityType是LayoutEntityType.NoteSeparator。用例:
Document doc = new Document("SomeDocument.docx") LayoutEnumerator en = new LayoutEnumerator(doc); // We start from the first page. Debug.Assert(en.Type == LayoutEntityType.Page); // Move to the first column on the page. en.MoveFirstChild(); Debug.Assert(en.Type == LayoutEntityType.Column); // Move to the first child in the column. en.MoveFirstChild(); do { if (en.Type == LayoutEntityType.NoteSeparator && en.Kind == "FOOTNOTESEPARATOR") { // Do something. } if (en.Type == LayoutEntityType.NoteSeparator && en.Kind == "FOOTNOTECONTINUATIONSEPARATOR") { // Do something. } if (en.Type == LayoutEntityType.NoteSeparator && en.Kind == "FOOTNOTECONTINUATIONNOTICE") { // Do something. } } while(en.MoveNext()); }
添加了一個新的布局選項來控制 Aspose.Words 在計算重新開始頁碼的連續(xù)部分中的頁碼時的行為:
更改后,默認(rèn)的 Aspose.Words 行為與當(dāng)前的 MS Word 版本 (2019) 匹配。根據(jù) WORDSNET-17760 實(shí)現(xiàn)的舊行為仍然可以通過引入的選項獲得:
Document doc = new Document("input.docx"); doc.LayoutOptions.ContinuousSectionPageNumberingRestart = ContinuosSectionRestart.FromNewPageOnly; doc.Save("out.pdf");
新 ChartFormat 類型的屬性已添加到 ChartSeries、ChartDataPoint 和 ChartMarker 類:
此外,一些現(xiàn)有屬性的別名已添加到 Stroke 類:ForeColor、BackColor、Visible 和 Transparency。原始的 Color、Color2、On 和 Opacity 屬性將在 Aspose.Words 的未來版本中過時。
用例:解釋如何設(shè)置系列顏色
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); Shape shape = builder.InsertChart(ChartType.Column, 432, 252); Chart chart = shape.Chart; ChartSeriesCollection seriesColl = chart.Series; // Delete default generated series. seriesColl.Clear(); // Create category names array. string[] categories = new string[] { "AW Category 1", "AW Category 2" }; // Adding new series. Value and category arrays must be the same size. ChartSeries series1 = seriesColl.Add("AW Series 1", categories, new double[] { 1, 2 }); ChartSeries series2 = seriesColl.Add("AW Series 2", categories, new double[] { 3, 4 }); ChartSeries series3 = seriesColl.Add("AW Series 3", categories, new double[] { 5, 6 }); // Set series color. series1.Format.Fill.ForeColor = Color.Red; series2.Format.Fill.ForeColor = Color.Yellow; series3.Format.Fill.ForeColor = Color.Blue; doc.Save("ColumnColor.docx");
OOXML Ink 內(nèi)容由 Ink 標(biāo)記語言的語法和語義子集指定。在此版本之前,Aspose.Words 只能為 OOXML Ink 對象渲染后備形狀,即實(shí)際上并未處理 InkML,而是使用簡單的預(yù)渲染圖像。現(xiàn)在可以直接渲染 OOXML 墨跡內(nèi)容部分(“冷”渲染)。
為了控制 Ink 渲染的模式,引入了一個新的公共屬性 SaveOptions.ImlRenderingMode 并添加了相應(yīng)的枚舉:
如果你想試用Aspose的全部完整功能,可聯(lián)系在線客服獲取30天臨時授權(quán)體驗。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn