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
Key | Summary | Category |
---|---|---|
VIEWERNET‑3095 | Add Lossless JPEG (JLS) file-format support | Feature |
VIEWERNET‑4124 | Convert all Excel worksheets to one HTML file | Feature |
VIEWERNET‑4141 | Support rendering PDF and EPUB documents to HTML with fluid layout | Feature |
VIEWERJAVA‑3252 | Enable users to have full control and flexibility in managing temporary files | Feature |
VIEWERNET‑2487 | “Parameter is not valid” exception when rendering PS file | Fix |
VIEWERNET‑2720 | Exception has been thrown by the target of an invocation when rendering PPSX | Fix |
VIEWERNET‑3365 | “Bit depth of 8 bits are supported for RGBA images.” exception when rendering PNG file | Fix |
VIEWERNET‑3429 | “Image export failed.” exception when rendering EMZ file | Fix |
VIEWERNET‑3500 | “Unable to read beyond the end of the stream.” exception when rendering ODS file | Fix |
VIEWERNET‑3718 | “Parameter is not valid.” exception when rendering WMZ file | Fix |
VIEWERNET‑4095 | PDF to HTML: Long execution time | Fix |
VIEWERNET‑4125 | The ArchiveOptions.ItemsPerPage property works incorrectly | Fix |
VIEWERNET‑4126 | When an archive file is converted to PDF, the output file does not display the path to archive folders | Fix |
VIEWERNET‑3264 | “Could not load file. File is corrupted or damaged.” exception when rendering CDR file | Fix |
Major Features
This release includes four features and one enhancement:
- Added support for the Lossless JPEG (.jls) images
- Added support for converting all Excel worksheets to one HTML file
- Added support for rendering the PDF and EPUB documents to HTML with fluid layout
- Added possibility to have full control and flexibility in managing temporary files
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:
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:
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.