GroupDocs.Viewer for .NET 17.7.0 Release Notes

Major Features

One new feature and 14 improvements and fixes in this regular monthly release. The most notable are:

  • Added support of rendering PDF document with attachments
  • Extended support for setting font directories for Presentation documents
  • Extended support for setting JpegQuality when rendering SVG as PDF

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERNET-1182Support rendering PDF documents with attachmentsNew Feature
VIEWERNET-1274Extend support for setting font directories to Presentation documentsImprovement
VIEWERNET-1255Extend support for setting JpegQuality when rendering SVG as PDFImprovement
VIEWERNET-1250Improve rendering Microsoft Visio document as HTMLImprovement
VIEWERNET-1173Rendering djvu documents with maximum JpegQuality renders contained images with low qualityImprovement
WEB-2429PDF with hieroglyphs is converted to the JPEG and HTML with corrupted symbolsBug
VIEWERNET-1262Resource prefix not applied when rendering Presentation documents to HTMLBug
VIEWERNET-1252Watermark not displayed when rendering Microsoft Visio document as HTMLBug
VIEWERNET-1251Multipage Microsoft Visio document shows page count as oneBug
VIEWERNET-1220ViewerConfig.DefaultFontName setting does not replace missing fonts for Spreadsheet documentsBug
VIEWERNET-1203Conflict when using GroupDocs.Viewer and Aspose APIs in same projectBug
VIEWERNET-1154Incorrect rendering of bullets in HTML modeBug
VIEWERNET-1151Incorrect Characters after rendering PDF in HTML/Image modeBug
VIEWERNET-1143Some characters are being replaced with a ? placeholder while rendering.Bug
VIEWERNET-917Failed to load DGN fileBug

Public API and Backward Incompatible Changes

How to set output quality when rendering documents into pdf

How to adjust the quality and size when rendering documents into pdf

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage\";
 
// Create image handler
 ViewerImageHandler handler = new ViewerImageHandler(config);
string guid = "document.djvu";
 
// Set pdf options JpegQuality in a range between 1 and 100
PdfFileOptions pdfFileOptions = new PdfFileOptions();
pdfFileOptions.JpegQuality = 5;
 
// Get file as pdf
using (FileContainer container = handler.GetPdfFile(guid, pdfFileOptions))
{
    Console.WriteLine("Stream lenght: {0}", container.Stream.Length);
}
List of formats affected by PdfFileOptions.JpegQuality property when rendered as pdf
Format NameDescription
Microsoft WordAffects JPEG images contained in Microsoft Word documents
Microsoft PowerPointAffects JPEG images contained in Microsoft Power Point documents
Microsoft OutlookAffects JPEG images set as a background in email documents msg and eml formats
OpenDocument FormatsAffects JPEG images contained in OpenDocument presentation (odp) andOpenDocument text (odt) formats
Image filesAffects rendering from PSD, TIFF, multi-page TIFF, WebP, SVG and DjVu formats
MetafileAffects rendering from WMF and EMF formats
Microsoft VisioAffects JPEG images contained inside Microsoft Visio documents

List of Changes in GroupDocs.Viewer for .NET 17.7.0

GroupDocs.Viewer.Converter.Options.PdfOptions - Public bool PreventGlyphsGrouping obsolete property compilation is set to fail

Using this property in non obsolete members will result in compilation error. Get ready for the change, this property is no longer active and will be completely removed in the next version. Please use EnablePreciseRendering property instead. The difference between this tow settings is that obsolete PreventGlyphsGrouping property has been influencing only rendering into HTML, whereas EnablePreciseRendering affects both image and HTML rendering. More over EnablePreciseRendering contains additional technics for improving rendering PDF documents.

Public GroupDocs.Viewer.Domain.EmailAttachment obsolete class and class members compilation is set to fail

Please use GroupDocs.Viewer.Domain.Attachment class instead as show in example below. This class is obsolete and will be removed in the next version.

Loading email attachments using obsolete and new class

Before v17.5.0 (C#)

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";
 
// Create attachment object and print out its name and file type
EmailAttachment attachment = new EmailAttachment("document-with-attachments.msg", "attachment-image.png");
Console.WriteLine("Attach name: {0}, size: {1}", attachment.Name, attachment.FileType);
 
// Get attachment original file and print out Stream length
using (FileContainer fileContainer = imageHandler.GetFile(attachment))
{
    Console.WriteLine("Attach stream lenght: {0}", fileContainer.Stream.Length);
}

v17.5.0 and higher (C#)

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";
 
// Create attachment object and print out its name and file type
Attachment attachment = new Attachment("document-with-attachments.msg", "attachment-image.png");
Console.WriteLine("Attach name: {0}, size: {1}", attachment.Name, attachment.FileType);
 
// Get attachment original file and print out Stream length
using (FileContainer fileContainer = imageHandler.GetFile(attachment))
{
    Console.WriteLine("Attach stream lenght: {0}", fileContainer.Stream.Length);
}

GroupDocs.Viewer.Domain.FileData - Public bool IsComplete property compilation is set to fail

This property will be removed in the next version