GroupDocs.Viewer for Java 23.11 Release Notes

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

Full list of changes in this release

KeySummaryCategory
VIEWERNET‑3095Add Lossless JPEG (JLS) file-format supportFeature
VIEWERNET‑4124Convert all Excel worksheets to one HTML fileFeature
VIEWERNET‑4141Support rendering PDF and EPUB documents to HTML with fluid layoutFeature
VIEWERJAVA‑3252Enable users to have full control and flexibility in managing temporary filesFeature
VIEWERNET‑2487“Parameter is not valid” exception when rendering PS fileFix
VIEWERNET‑2720Exception has been thrown by the target of an invocation when rendering PPSXFix
VIEWERNET‑3365“Bit depth of 8 bits are supported for RGBA images.” exception when rendering PNG fileFix
VIEWERNET‑3429“Image export failed.” exception when rendering EMZ fileFix
VIEWERNET‑3500“Unable to read beyond the end of the stream.” exception when rendering ODS fileFix
VIEWERNET‑3718“Parameter is not valid.” exception when rendering WMZ fileFix
VIEWERNET‑4095PDF to HTML: Long execution timeFix
VIEWERNET‑4125The ArchiveOptions.ItemsPerPage property works incorrectlyFix
VIEWERNET‑4126When an archive file is converted to PDF, the output file does not display the path to archive foldersFix
VIEWERNET‑3264“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. See the Determine the file type topic for more information.

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>
 */
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. For details, see the Split a worksheet into pages topic. Since v23.11, you can convert all worksheets to one HTML file by setting the HtmlViewOptions#setRenderToSinglePage property to true.

try (Viewer viewer = new Viewer(sourceXlsxFile)) {
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources("page_{0}.html");
    viewOptions.setRenderToSinglePage(true);
    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 (Viewer viewer = new Viewer("Letter.pdf")) {
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    HtmlViewOptions viewOptions = 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.11 we have added ability to control and override logic of creating temporary files and folders which are used by GroupDocs.Viewer for Java. The following code snippet shows how to override the logic:

TemporaryFileManagerFactory.setInstance(new CustomTemporaryFileManager());

For details, see the GroupDocs.Viewer for Java documentation.