GroupDocs.Viewer for Node.js via Java 23.12 Release Notes

There are 14 features, enhancements, and bug fixes in this release.

Full list of changes in this release

KeySummaryCategory
VIEWERNODEJS‑79Add Lossless JPEG (JLS) file-format supportFeature
VIEWERNODEJS‑80Convert all Excel worksheets to one HTML fileFeature
VIEWERNODEJS‑81Support rendering PDF and EPUB documents to HTML with fluid layoutFeature
VIEWERNODEJS‑82Enable users to have full control and flexibility in managing temporary filesFeature
VIEWERNODEJS‑83“Parameter is not valid” exception when rendering PS fileFix
VIEWERNODEJS‑84Exception has been thrown by the target of an invocation when rendering PPSXFix
VIEWERNODEJS‑85“Bit depth of 8 bits are supported for RGBA images.” exception when rendering PNG fileFix
VIEWERNODEJS‑86“Image export failed.” exception when rendering EMZ fileFix
VIEWERNODEJS‑87“Unable to read beyond the end of the stream.” exception when rendering ODS fileFix
VIEWERNODEJS‑88“Parameter is not valid.” exception when rendering WMZ fileFix
VIEWERNODEJS‑89PDF to HTML: Long execution timeFix
VIEWERNODEJS‑90The ArchiveOptions.ItemsPerPage property works incorrectlyFix
VIEWERNODEJS‑91When an archive file is converted to PDF, the output file does not display the path to archive foldersFix
VIEWERNODEJS‑92“Could not load file. File is corrupted or damaged.” exception when rendering CDR fileFix

Major Features

This release includes four features and one enhancement:

Public API and backward incompatible changes

Added support for Lossless JPEG (.jls) images

This image format was developed by Joint Photographic Experts Group as addition to the JPEG format. It allows programs to control level of compression and save images lossless or near-lossless. For more information about rendering images, see Render images as HTML, PDF, PNG, and JPEG files. This file type can be automatically detected by GroupDocs.Viewer. We added a new JLS field to the FileType class. See list of supported file types see the Supported file formats topic.

/**
 * <p>
 * Represents a JPEG-LS (JLS) file (.jls).
 * Learn more about this file format <a href="https://fileinfo.com/extension/jls">here</a>.
 * </p>
 */
groupdocs.viewer.JLS("JPEG-LS (JLS)", ".jls")

Added support for converting all Excel worksheets to one HTML file

By default, GroupDocs.Veiwer splits the Excel spreadsheets to HTML files using page breaks. Since v23.12, you can convert all worksheets to one HTML file by setting the HtmlViewOptions.setRenderToSinglePage property to true.

try {
    const viewer = new groupdocs.viewer.Viewer(sourceXlsxFile);
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    const viewOptions = groupdocs.viewer.HtmlViewOptions.forEmbeddedResources("page_{0}.html");
    viewOptions.setRenderToSinglePage(true); // Enable it if you want to convert all CHM content to single page
    viewer.view(viewOptions);
  }

The following image shows the result:

Convert all Excel worksheets to one HTML file

Added support for rendering PDF and EPUB documents to HTML with fluid layout

We added support for rendering PDF and EPUB documents in HTML with a fluid layout. By default, GroupDocs.Viewer displays EPUB and PDF documents in a fixed layout. For details, see the Create HTML with fixed layout topic.

When rendering to HTML with a fluid layout HTML, document does not have a fixed size. To render PDF or EPUB documents to HTML with a fluid layout, set the PdfOptions.FixedLayout property to false.

try {
    const viewer = new groupdocs.viewer.Viewer("Letter.pdf");
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    const viewOptions = groupdocs.viewer.HtmlViewOptions.forEmbeddedResources("page_{0}.html");
    viewOptions.getPdfOptions().setFixedLayout(false);
    viewer.view(viewOptions);
  }

The following image shows the PDF document rendered to HTML with a fluid layout:

Render PDF to HTML with fluid layout

Added possibility to have full control and flexibility in managing temporary files

Starting from 23.12 we have added ability to control and override logic of creating temporary files and folders which are used by GroupDocs.Viewer for Node.js via Java. The following code snippet shows how to override the logic:

groupdocs.viewer.TemporaryFileManagerFactory.setInstance(new groupdocs.viewer.CustomTemporaryFileManager());

For details, see the GroupDocs.Viewer for Node.js via Java documentation.