原創|產品更新|編輯:李顯亮|2021-06-18 09:55:03.070|閱讀 229 次
概述:Aspose.words for java更新至v21.6,在這個每月定期發布的版本中有 105 項改進和修復,歡迎下載體驗。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
隨著.NET版Aspose.Words for .Net v21.6的發布,Java版也隨之更新,除了一些通用功能外,也獨有新改善。
Aspose.Words for Java是一種高級Java Word處理API,使您可以直接在Java應用程序中執行各種文檔處理任務,無需Microsoft Word即可生成,修改和轉換文檔。
主要特點如下:
>>你可以點擊這里下載Aspose.Words for Java v21.6測試體驗。
序號 | 概括 | 類別 |
WORDSNET-21647 | DOCX 轉 PDF:發生內容置換 | 新功能 |
WORDSNET-12748 | 提供API更改圖表類別系列顏色 | 新功能 |
WORDSNET-13907 | 支持渲染 DrawingML InkML ContentPart | 新功能 |
WORDSNET-12275 | 添加功能以更改 ChartSeries 的顏色 | 新功能 |
WORDSNET-21847 | 未應用高級 OpenType 字體功能 | 新功能 |
WORDSNET-21871 | 添加功能以創建帶線條的散點圖 | 新功能 |
WORDSNET-22070 | 提供始終為 LINQ 報告引擎的 XML 根元素生成對象的選項 | 新功能 |
WORDSNET-12529 | 添加功能以獲取/設置亞洲字符間距屬性 | 新功能 |
WORDSNET-22082 | storeItemChecksum 獲取/設置方法 | 新功能 |
WORDSNET-22002 | 實現 Fill.PresetTextured() 方法 | 新功能 |
WORDSNET-20023 | 允許更改餅圖顏色 | 新功能 |
WORDSNET-21972 | 提供始終為 LINQ 報告引擎的 JSON 根元素生成對象的選項 | 新功能 |
WORDSNET-15201 | 為帶有腳注的連續部分實施 MS Word 2013 行為 | 新功能 |
WORDSJAVA-1871 | 定期檢查和更新 OSGI 兼容性。 | 新功能 |
WORDSJAVA-2589 | .txt 文檔中列表的羅馬編號樣式 | 新功能 |
WORDSNET-17510 | Aspose.Words 不模仿 MS Word 的文檔結構標簽 | 增強 |
WORDSNET-18186 | 從 Word 到 PDF 的轉換過程中丟失了墨跡注釋 | 增強 |
WORDSNET-20020 | 轉換后的 Word 文檔的透明度未顯示在 PDF 中 | 增強 |
WORDSNET-12640 | 添加設置/獲取圖表系列顏色的功能 | 增強 |
WORDSNET-20462 | DOCX轉PDF后手寫內容丟失 | 增強 |
WORDSNET-21156 | LayoutCollector 返回的值不正確 | 增強 |
WORDSNET-19199 | 帶有免費手繪圖像的 DOCX 轉 PDF | 增強 |
WORDSNET-22090 | TXT 文件中的每一行都應該有一個固定長度的字符 | 行中允許的最大字符數 | 增強 |
WORDSNET-21795 | DOCX 到 PDF/A 的轉換和驗證失敗:標題內的WORDS/空格分隔問題 | 增強 |
公共枚舉 LayoutEntityType 中添加了一個新值Note:
這將幫助用戶迭代腳注/尾注容器內的注釋。用例如下:
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 在計算重新開始頁碼的連續部分中的頁碼時的行為:
更改后,默認的 Aspose.Words 行為與當前的 MS Word 版本 (2019) 匹配。根據 WORDSNET-17760 實現的舊行為仍然可以通過引入的選項獲得:
Document doc = new Document("input.docx"); doc.LayoutOptions.ContinuousSectionPageNumberingRestart = ContinuosSectionRestart.FromNewPageOnly; doc.Save("out.pdf");
新 ChartFormat 類型的屬性已添加到 ChartSeries、ChartDataPoint 和 ChartMarker 類:
此外,一些現有屬性的別名已添加到 Stroke 類:ForeColor、BackColor、Visible 和 Transparency。原始的 Color、Color2、On 和 Opacity 屬性將在 Aspose.Words 的未來版本中過時。
用例:解釋如何設置系列顏色
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 內容由 Ink 標記語言的語法和語義子集指定。在此版本之前,Aspose.Words 只能為 OOXML Ink 對象渲染后備形狀,即實際上并未處理 InkML,而是使用簡單的預渲染圖像。現在可以直接渲染 OOXML 墨跡內容部分(“冷”渲染)。
為了控制 Ink 渲染的模式,引入了一個新的公共屬性 SaveOptions.ImlRenderingMode 并添加了相應的枚舉:
如果你想試用Aspose的全部完整功能,可聯系在線客服獲取30天臨時授權體驗。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn