我們很高興宣佈 GroupDocs.Viewer for Node.js via Java 26.9 已於 2026 年 9 月 正式發佈。此版本帶來了四項從 GroupDocs.Viewer for .NET 與 Java 移植的新功能、兩項 Java 專屬的壓縮檔增強,以及七項錯誤修復。公共 API 已擴充新成員,且部分既有成員已修改以支援新功能。
本次發佈的新增內容
- [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] DOCX 轉 HTML 時,阿拉伯字元與 EnableOpenTypeFeatures 選項同時啟用會導致渲染錯誤 (VIEWERNET-5681)
- [Bug] EPSF 格式支援受限,解析 EPSF 檔案內容時發生錯誤 (VIEWERNET-5683)
- [Bug] 點陣化壓縮檔的實際尺寸與 GetViewInfo 計算結果不符 (VIEWERNET-5737)
Public API 變更
Added
FileType.OFD欄位 (VIEWERNET-4630)WordProcessingOptions.getHorizontalResolution/setHorizontalResolution(int)方法,回傳int型別 (VIEWERNET-5700)WordProcessingOptions.getVerticalResolution/setVerticalResolution(int)方法,回傳int型別 (VIEWERNET-5700)WordsPageNumberLocation列舉 (VIEWERNET-5702)WordProcessingOptions.getPageNumberLocation/setPageNumberLocation(WordsPageNumberLocation)方法,回傳WordsPageNumberLocation型別 (VIEWERNET-5702)
Modified
BaseViewOptions.setRenderNotes/isRenderNotes():其適用範圍已擴展至 PDF 文件 (VIEWERNET-5607)
Removed
- 無
新功能
VIEWERNET-4630
自本版本起,GroupDocs.Viewer for Node.js via 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 resolution
const viewer = new Viewer(inputFilePath);
const options = new WordProcessingOptions();
options.setPageNumberLocation(WordsPageNumberLocation.TopCenter);
options.setHorizontalResolution(150);
options.setVerticalResolution(150);
viewer.render("output_%d.png", options);
如何取得更新
npm
透過 npm 將 groupdocs-viewer 套件升級至最新版本:
npm install groupdocs-viewer
直接下載
從 GroupDocs.Viewer for Node.js via Java 26.9 頁面下載套件。