GroupDocs.Viewer for .NET 18.3 Release Notes

Major Features

There are 15 new features, improvements, and fixes in this regular monthly release. The most notable are:

  • Added support for following file formats:
    • XLTM (Excel Open XML Macro-Enabled Spreadsheet)
    • XLTX (Excel Open XML Spreadsheet Template)
  • Added support of HtmlOptions.ExcludeFonts for Text (Microsoft Word) document
  • Improved rendering Microsoft OneNote documents as HTML
  • Added support for ShowHiddenSlides option for Open Document Presentation documents
  • Added option which allows to specify image quality when rendering PDF documents as HTML

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERNET-1530Specify image quality when rendering PDF documents as HTMLNew Feature
VIEWERNET-1451Add XLTM file format supportNew Feature
VIEWERNET-1450Add XLTX file format supportNew Feature
VIEWERNET-1512Extend support of HtmlOptions.ExcludeFonts option for Text documentsImprovement
VIEWERNET-1510Improve rendering MS OneNote documents into HTML by providing pure HTML and SVGImprovement
VIEWERNET-1497Exporting contained images when rendering SVG to HTMLImprovement
VIEWERNET-1480Extend support for ShowHiddenSlides option to Open Document PresentationImprovement
VIEWERNET-1283Improve rendering metafile images into HTMLImprovement
WEB-1740Text is garbled in an Arabic PDFBug
VIEWERNET-1508Blur output when rendering PDF as HtmlBug
VIEWERNET-1500Printable Html gets messy when adding watermarkBug
VIEWERNET-1499Content minification prevents styles loadingBug
VIEWERNET-1493Access to the path “/Path/to/file/fd.xml” is deniedBug
VIEWERNET-1435ViewerConfig.FontDirectories property not working for Presentation documentsBug
VIEWERNET-1528Converting DNG image into JPG provides output with light spotsBug

Public API and Backward Incompatible Changes

Image quality when rendering PDF documents as HTML

When rendering PDF documents as HTML, GroupDocs.Viewer creates single image resource which contains all the images from the PDF document page and uses created image as the background for HTML document. Starting from v18.3, new option added to PdfOptions class called ImageQuality which allows you to control image resource quality. Supported values are Low, Medium and High. Please note that with Low value you’ll have the best performance and with High value, you’ll have the best quality but it will slow down rendering.

How to render PDF document with image quality option

//Init viewer config
ViewerConfig viewerConfig = new ViewerConfig();
viewerConfig.StoragePath = "c:\\storage";
  
// Init viewer html handler
ViewerHtmlHandler viewerHtmlHandler = new ViewerHtmlHandler(viewerConfig);
  
// Set the guid of the document you want to render
string guid = "with-images.pdf";
  
//Set desired image quality in the output HTML document
HtmlOptions htmlOptions = new HtmlOptions();
htmlOptions.PdfOptions.ImageQuality = ImageQuality.High;
 
//Render document with specified options
List<PageHtml> pages = viewerHtmlHandler.GetPages(guid, htmlOptions);
  
foreach (PageHtml page in pages)
{
    Console.WriteLine("Page number: {0}", page.PageNumber);
    Console.WriteLine("Html content: {0}", page.HtmlContent);
}

List of Changes in v18.3

GroupDocs.Viewer.Converter.Options.PdfOptions

public ImageQuality ImageQuality { get; set; } property has been added

This property allows specifying image quality when rendering PDF documents as HTML. Supported values are Low, Medium and High. The default value is Low.

How to render document with desired image quality

//Init viewer config
ViewerConfig viewerConfig = new ViewerConfig();
viewerConfig.StoragePath = "c:\\storage";
 
// Init viewer html handler
ViewerHtmlHandler viewerHtmlHandler = new ViewerHtmlHandler(viewerConfig);
 
// Set the guid of the document you want to render
string guid = "with-images.pdf";
 
//Set desired image quality in the output HTML document
HtmlOptions htmlOptions = new HtmlOptions();
htmlOptions.PdfOptions.ImageQuality = ImageQuality.High;
//Render document with specified options
List<PageHtml> pages = viewerHtmlHandler.GetPages(guid, htmlOptions);