GroupDocs.Viewer for .NET 22.11 Release Notes

There are 15 features and bug fixes in this release.

Full list of changes in this release

IDSummaryCategory
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
VIEWERNET-4142Replace BinnaryFormatter with XmlSerializer in FileCache classEnhancement
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-4143UIPath with route parameters read as a string instead of patternFix
VIEWERNET-3264“Could not load file. File is corrupted or damaged.” exception when rendering CDR fileFix

Major Features

This release includes three features and one enhancement:

Added support for Lossless JPEG (.jls) images

This image format was developed by Joint Photographic Experts Group as addition to JPEG format to enabled programs to control level of compression and save images lossless or near-lossless. See the following topic for more information about rendering images: Render images as HTML, PDF, PNG, and JPEG files. This file type can be automatically detected by Viewer. See Determine the file type topic for more information.

New JLS fileld added to the FileType class. For all supported file types see Supported file formats.

/// <summary>
/// JPEG-LS (JLS) (.jls)
/// </summary>
public static readonly FileType JLS = new FileType("JPEG-LS (JLS)", ".jls");

Added support for converting all Excel worksheets to one HTML file

By default, Excel spreadsheets are converted by page breaks. See the following topic for more information: Split a worksheet into pages. With v22.11, you can convert all worksheets to one HTML file by setting the HtmlViewOptions.RenderToSinglePage property to true.

using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
// ...

using (var viewer = new Viewer("Personal_net_worth_calculator.xlsx"))
{
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
    viewOptions.RenderToSinglePage = true;
    viewer.View(viewOptions);
}

The following image demonstrates the result:

Convert all Excel worksheets to one HTML file

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

In this version, we’ve added support for rendering PDF and EPUB documents to HTML with a fluid layout. By default, EPUB and PDF documents are rendered with a fixed layout. See the following topic for more information: Create HTML with fixed layout.

When rendering to HTML with a fluid layout HTML document doesn’t have a fixed size. To render PDF or EPUB documents to HTML with a fluid layout set PdfOptions.FixedLayout property to false.

using GroupDocs.Viewer;
using GroupDocs.Viewer.Options;
// ...

using (var viewer = new Viewer("Letter.pdf"))
{
    // Convert the spreadsheet to HTML.
    // {0} is replaced with the current page number in the file names.
    var viewOptions = HtmlViewOptions.ForEmbeddedResources("page_{0}.html");
    viewOptions.PdfOptions.FixedLayout = false;
    viewer.View(viewOptions);
}

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

Render PDF to HTML with fluid layout

BinaryFormatter was replaced with XmlSerializer in FileCache class

The default implementation of ICache interface the FileCache class used BinnaryFormatter to serialize and deserialize ViewInfo and derived types. BinnaryFormatter was replaced with XmlSerializer. To support serialization with XmlSerializer default parameterless constructors and set property accessors added to FileType class and all types in GroupDocs.Viewer.Results namespace.