What’s new in this release

GroupDocs.Viewer for Java 25.12 introduces three new features that affect the public API, two enhancements, and eight bug fixes.

ID Category Summary
VIEWERNET‑5239 New feature Optionally disable preserving JavaScript when converting documents to HTML.
VIEWERNET‑5486 New feature Introduce distinct font type for each formats family.
VIEWERNET‑5484 New feature List substituted fonts when getting all fonts for the WordProcessing family formats.
VIEWERNET‑5490 Improvement Embed fonts when converting Spreadsheet documents to embedded HTML.
VIEWERNET‑5475 Improvement Support “freeze top row” while rendering Spreadsheet documents to HTML.

New font‑related API

The release adds a family‑specific font model:

  • com.groupdocs.viewer.fonts.IFontInfo – base interface.
  • Implementations: WordProcessingFontInfo, WordProcessingSubstitutedFontInfo, PdfFontInfo, SpreadsheetFontInfo, PresentationFontInfo.

The former com.groupdocs.viewer.fonts.UsedFontInfo class has been removed, and FontStyles has been changed from an enum to a full‑featured class.

Note: The documentation article * Getting all used fonts in the loaded document * was rewritten to cover these changes.

Embedded fonts for Spreadsheet → HTML

When rendering a Spreadsheet (.xls, .xlsx, etc.) to embedded HTML with the factory method HtmlViewOptions.forEmbeddedResources(), fonts are now automatically embedded (base‑64 encoded) unless the isExcludeFonts() flag is explicitly set to true.

// Example: Convert a Spreadsheet to embedded HTML with fonts embedded
HtmlViewOptions options = HtmlViewOptions.forEmbeddedResources("output.html")
options.setExcludeFonts(false); // default is false

Viewer viewer = new Viewer("sample.xlsx");
viewer.view(options);

If you prefer an HTML output without embedded fonts, call options.setExcludeFonts(true).

Fixes and enhancements

ID Category Summary
VIEWERNET‑5060 Bug CustomTempFonts folder kept growing on .NET Framework 4.6.2 (irrelevant for Java but documented).
VIEWERNET‑5145 Bug Merged letters appear when saving PPTX to HTML with images.
VIEWERNET‑5379 Bug Logo missing at the right‑bottom corner when converting PPTX to HTML.
VIEWERNET‑5417 Bug JPEG → PDF conversion produced corrupted PDFs that opened with errors in Adobe Acrobat.
VIEWERNET‑5378 Bug Exception thrown during PDF → HTML conversion.
VIEWERNET‑5374 Bug PDF attachments were malformed when rendered to HTML.
VIEWERNET‑5345 Bug Background gradient rendered incorrectly for PDF → HTML conversion.
VIEWERNET‑3780 Bug Failure to load certain PSD files.
VIEWERNET‑5475 Improvement Added “freeze top row” support while rendering Spreadsheet documents to HTML.
VIEWERNET‑5490 Improvement Embedded fonts for Spreadsheet → embedded HTML (see code sample above).

Public API changes

Added

  • com.groupdocs.viewer.fonts.IFontInfo – base interface.
  • Concrete font info classes:
    • WordProcessingFontInfo
    • WordProcessingSubstitutedFontInfo
    • PdfFontInfo
    • SpreadsheetFontInfo
    • PresentationFontInfo
  • com.groupdocs.viewer.fonts.FontStyles – now a full class with numerous properties (previously an enum).

Removed

  • com.groupdocs.viewer.fonts.UsedFontInfo – replaced by IFontInfo hierarchy.
  • com.groupdocs.viewer.fonts.FontStyles enum – replaced by the new class.

These changes are reflected in the updated Javadoc at https://reference.groupdocs.com/viewer/java/.

How to get the update

The library is distributed via Maven Central. Update your pom.xml (or Gradle build file) to the newest version:

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

Alternatively, download the compiled JARs from the official release page:
https://releases.groupdocs.com/viewer/java/new-releases/groupdocs-viewer-for-java-25-12/

Resources