我們很高興宣佈 GroupDocs.Viewer for Java 26.9 已於 2026 年 9 月 正式發佈。此版本帶來了四項從 GroupDocs.Viewer for .NET 移植的新功能、兩項針對 Java 的壓縮檔增強,以及五項錯誤修復——大幅提升了對 PDF、WordProcessing 與壓縮檔格式的支援。

本次發佈的新增內容

  • [New feature] 新增對 Open Fixed‑layout Document (OFD) 檔案格式的支援 (VIEWERNET-4630)
  • [New feature] 實作在 PDF 渲染時預設隱藏的註解顯示功能 (VIEWERNET-5607)
  • [New feature] 在將 WordProcessing 文件渲染為點陣圖格式時,可於 WordProcessing 選項中指定水平與垂直解析度 (VIEWERNET-5700)
  • [New feature] 在渲染 WordProcessing 文件時加入頁碼功能 (VIEWERNET-5702)
  • [Enhancement] 修正壓縮檔名稱顯示不正確的問題 (VIEWERJAVA-3952)
  • [Enhancement] 支援使用外部資源檢視壓縮檔 (VIEWERJAVA-3953)
  • [Bug] 轉換 EML 為 HTML 與點陣圖格式時,特殊字元渲染錯誤且表格邊框遺失 (VIEWERNET-5620)
  • [Bug] PDF 渲染時遺失註解的問題 (VIEWERNET-5654)
  • [Bug] 在啟用 EnableOpenTypeFeatures 選項時,DOCX 轉 HTML 渲染阿拉伯字元不正確 (VIEWERNET-5681)
  • [Bug] EPSF 格式支援受限,解析 EPSF 檔案內容時發生錯誤 (VIEWERNET-5683)
  • [Bug] 點陣化壓縮檔的實際尺寸與 GetViewInfo 計算結果不符 (VIEWERNET-5737)

Public API 變更

Added

Modified

Removed

  • 無

新功能

VIEWERNET-4630

自本版本起,GroupDocs.Viewer for Java 支援 Open Fixed‑layout Document (OFD) 檔案格式。處理 OFD 檔案需要作業系統中存在 SimSun.ttf 字型(Windows 通常預裝;Linux 可能需要透過自訂字型來源手動提供)。此功能在 Render OFD documents 章節中有詳細說明。

VIEWERNET-5607

現在可透過已存在的 setRenderNotes 選項,啟用 PDF 檔案中預設隱藏的彈出註解(氣球提示)的渲染——此選項的含義已擴展至 PDF 文件。此文章章節 針對此功能作了詳細說明。

VIEWERNET-5700

如同先前版本對 Spreadsheet 文件的支援,26.9 版允許在將 WordProcessing 文件渲染為點陣圖格式(PNG、JPEG)時,指定水平與垂直解析度(DPI)。這透過 WordProcessingOptions 類別中的新方法 setHorizontalResolution 與 setVerticalResolution 完成。兩個選項的預設值為 96 DPI,且可設定的範圍為 [72..600] DPI。此功能在關於渲染 WordProcessing 文件的文章的 相應章節 中有詳細說明。

VIEWERNET-5702

本版本新增 PageNumberLocation 選項至 WordProcessingOptions 類別。使用者現在可以在渲染過程中強制為 WordProcessing 文件加入頁碼,並指定頁碼在頁面上的位置。此功能的說明請參閱 此處。

程式碼範例

// Example: Render WordProcessing document with page numbers and custom DPI
WordProcessingOptions wordOptions = new WordProcessingOptions();
wordOptions.setPageNumberLocation(WordsPageNumberLocation.TopRight);
wordOptions.setHorizontalResolution(150);
wordOptions.setVerticalResolution(150);

// Render to HTML with page numbers and specified DPI
viewer.view("document.docx", wordOptions, "output.html");

如何取得更新

Maven

在 pom.xml 中加入以下相依性:

<dependency>
    <groupId>com.groupdocs</groupId>
    <artifactId>groupdocs-viewer</artifactId>
    <version>26.9</version>
</dependency>

或直接前往 GroupDocs.Viewer for Java Maven Repository 下載。

直接下載

從 GroupDocs.Viewer for Java 26.9 頁面下載 JAR 檔案。

資源