GroupDocs.Viewer for .NET 21.11 Release Notes

Major Features

There are 19 features, improvements, and bug-fixes in this release, most notable are:

  • Set resolution for images in presentations that are rendered to HTML
  • Add support of rendering QR-codes in Word files
  • Add cancellation token support for CAD documents on save
  • Try to open files with Excel extension as TSV/CSV
  • Links now working when rendering CHM files to HTML

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERNET-3681Add support of rendering QR-codes in Word filesFeature
VIEWERNET-3689Set resolution for images in presentations that are rendered to HTMLFeature
VIEWERNET-3672Add cancellation token support for CAD documents on saveImprovement
VIEWERNET-3694Try to open files with Excel extension as TSV/CSVImprovement
VIEWERNET-3728Remove duplicate Action and Func delegates for .NET Framework 4 and .NET Standard 2.0 assembliesImprovement
VIEWERNET-2867"Could not load file. File is corrupted or damaged.” exception when rendering HPG fileBug
VIEWERNET-2920Try to autodetect file format and open file when file extension is wrongBug
VIEWERNET-2986Links are broken when rendering CHM files to HTMLBug
VIEWERNET-3187"Failed to render CAD document into PDF.” exception when rendering DWG file”Bug
VIEWERNET-3223Viewer - html files with erroneous css classBug
VIEWERNET-3405"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-3421"Could not load file. File is corrupted or damaged.” exception when rendering DWF fileBug
VIEWERNET-3453Watermark text size issue with pdf in DotNet through Viewer APIBug
VIEWERNET-3596"CAD document rendering failed.Please check that CadOptions sizing options do not have too low or too high values.“exception when rendering DWF fileBug
VIEWERNET-3675For VSSX-file it is not generating cache HTML-file for the second page.Bug
VIEWERNET-3680Exception of type ‘System.Exception’ was thrown when rendering PDF in .NET 6 appBug
VIEWERNET-3730Exception when opening particular EPS fileBug
VIEWERNET-3731Missing text when rendering PS into PDFBug
VIEWERNET-3732Errors while extracting a text from PDFBug

Behavior changes

Since GroupDocs.Viewer 21.11 version if the file extension is wrong, GroupDocs.Viewer will try to detect the actual format and render the file. Since GroupDocs.Viewer 21.11 version you can set a resolution for images inside presentations when rendering to HTML:

 using (Viewer viewer = new Viewer("presentation.pptx"))
 {
      HtmlViewOptions options = HtmlViewOptions.ForEmbeddedResources("result_{0}.html");
      htmlViewOptions.PresentationOptions.Resolution = Resolution.Dpi72;

      viewer.View(options);
 }

Read more information in Set resolution for images when rendering to HTML article.

Public API Changes

GroupDocs.Viewer.Common namespace

Removed duplicate delegates in .NET 2.0 assembly from GroupDocs.Viewer.Common namespace:

  • public delegate void Action();
  • public delegate void Action<in T1>(T1 arg1);

Removed duplicate delegates in .NET Framework 4 and .NET Standard 2.0 assemblies from GroupDocs.Viewer.Common namespace

  • public delegate void Action();
  • public delegate void Action<in T1, in T2>(T1 arg1, T2 arg2);
  • public delegate void Action<in T1, in T2, in T3>(T1 arg1, T2 arg2, T3 arg3);
  • public delegate TResult Func<out TResult>();
  • public delegate TResult Func<in T, out TResult>(T arg);
  • public delegate TResult Func<in T1, in T2, out TResult>(T1 arg1, T2 arg2);
  • public delegate TResult Func<in T1, in T2, in T3, out TResult>(T1 arg1, T2 arg2, T3 arg3);
  • public delegate TResult Func<in T1, in T2, in T3, in T4, out TResult>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);

GroupDocs.Viewer.Options.BaseViewOptions class

Added new PresentationOptions property.

/// <summary>
/// The presentation processing documents view options.
/// </summary>
public PresentationOptions PresentationOptions { get; set; } = new PresentationOptions();

GroupDocs.Viewer.Options namespace

Added new GroupDocs.Viewer.Options.PresentationOptions and GroupDocs.Viewer.Options.Resolution classes.

/// <summary>
/// Provides options for rendering presentations options.
/// </summary>
public class PresentationOptions
{
    /// <summary>
    /// Resolution for images inside presentation (for to HTML/PDF rendering only).
    /// </summary>
    public Resolution Resolution { get; set; } = Resolution.DocumentResolution;
}

/// <summary>
/// Provides option to set resolution for images in output document.
/// </summary>
public class Resolution
{
    /// <summary>
    /// Good quality for high-definition (HD) displays.
    /// </summary>
    public static readonly Resolution Dpi330 = new Resolution(330);

    /// <summary>
    /// Excellent quality on most printers and screens.
    /// </summary>
    public static readonly Resolution Dpi220 = new Resolution(220);

    /// <summary>
    /// Good for web pages and projectors.
    /// </summary>
    public static readonly Resolution Dpi150 = new Resolution(150);

    /// <summary>
    /// Good for web pages and projectors.
    /// </summary>
    public static readonly Resolution Dpi96 = new Resolution(96);

    /// <summary>
    ///  Default compression level.
    /// </summary>
    public static readonly Resolution Dpi72 = new Resolution(72);

    /// <summary>
    ///  Default compression level - as in the document.
    /// </summary>
    public static readonly Resolution DocumentResolution = new Resolution(0);

    /// <summary>
    /// Quality DPI.
    /// </summary>
    public int Value { get; private set; }

    /// <summary>
    /// Create resolution in DPI.
    /// </summary>
    /// <param name="value">Resolution in DPI.</param>
    public Resolution(int value)
    {
        Value = value;
    }
}

© Aspose Pty Ltd 2001-2022. All Rights Reserved.