GroupDocs.Viewer For .NET 16.11 Release Notes

Major Features

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

  • Ability to set default font when rendering Email documents
  • OTP (OpenDocument Presentation Template) file format viewing support
  • Improved public API of ViewerConfig class and IInputDataHandler interface
  • When viewing two documents in one browser page CSS classes are not overriding

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
VIEWERNET-955Ability to set default font when rendering Email documentsNew Feature
VIEWERNET-849Add OTP format supportNew Feature
VIEWERNET-966Improve public API of ViewerConfig classImprovement
VIEWERNET-963Improve rendering CAD (dwg, dxf) documents to PdfImprovement
VIEWERNET-957Improve public API of IInputDataHandler interfaceImprovement
VIEWERNET-927Display HTML pages of two different documents in the same page in browser without overriding css classesImprovement
WEB-2447The background is missed for IE 11Bug
WEB-2109Special characters like accents, umlauts and circumflex are displayed incorrectly when saving specific PDF to HTMLBug
WEB-1398A ligature is shown incorrectly in HTML produced from PDFBug
VIEWERNET-979Invalid characters while rendering Word document into HTMLBug
VIEWERNET-958Throws unsupported file format exception when loading specific doc fileBug
VIEWERNET-956Getting exception “File type ‘doc’ is not supported”Bug
VIEWERNET-949Parameter is not valid exception when rendering xlsx to imageBug
VIEWERNET-877Extra blank page created when convering dwg to pdf.Bug
VIEWERNET-848Failed to convert wmf file to image in Asp.Net application.Bug
VIEWERNET-847Incorrect Rendering of Radio Buttons, Checkboxes and their Label into HtmlBug
VIEWERNET-775No text when converting Pdf to Html with FontAbsorberBug

Public API and Backward Incompatible Changes

Ability to set default font when rendering Email documents

Default font name may be specified in this cases:

  1. You want to generally specify the default font to fall back on if a particular font in a document cannot be found during rendering.
  2. Your document uses fonts that contain non-English characters and you want to make sure any missing font is replaced with one that has the same character set available.
// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";
config.DefaultFontName = "Calibri";


Improved Public APIs

  1. Improve public API of ViewerConfig classPublic API changes:
    1. Class GroupDocs.Viewer.Config.ViewerConfig property public string TempFolderName marked as ‘Obsolete’
    2. Class GroupDocs.Viewer.Config.ViewerConfig property public string TempPath marked as ‘Obsolete’
  2. Improve public API of IInputDataHandler interface Public API changes:
    1. Class ViewerImageHandler/ViewerHtmlHandler method FileListContainer GetFileList() added
    2. Class_ViewerImageHandler/ViewerHtmlHandler_ method GetFileList(FileListOptions fileListOptions) added
    3. Class ViewerImageHandler/ViewerHtmlHandler method FileTreeContainer LoadFileTree() marked as ‘Obsolete’
    4. Class ViewerImageHandler/ViewerHtmlHandler method FileTreeContainer LoadFileTree(FileTreeOptions fileTreeOptions) marked as ‘Obsolete’
    5. Class GroupDocs.Viewer.Domain.Containers.FileTreeContainer marked as ‘Obsolete’
    6. Class GroupDocs.Viewer.Domain.Options.FileTreeOptions marked as ‘Obsolete’
    7. Interface GroupDocs.Viewer.Handler.Input.IInputDataHandler method SaveDocument(CachedDocumentDescription cachedDocumentDescription, Stream documentStream) marked as ‘Obsolete’
    8. Interface GroupDocs.Viewer.Handler.Input.IInputDataHandler method LoadFileTree(FileTreeOptions fileTreeOptions) marked as ‘Obsolete’
    9. Interface GroupDocs.Viewer.Handler.Input.IInputDataHandler method void AddFile(string guid, Stream content) added
    10. Interface GroupDocs.Viewer.Handler.Input.IInputDataHandler method List GetEntities(string path) added

Get file list

Load file list for ViewerConfig.StoragePath

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";

// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);

// Load file list for ViewerConfig.StoragePath
FileListContainer container = imageHandler.GetFileList();
foreach (var node in container.Files)
{
    if (node.IsDirectory)
    {
        Console.WriteLine("Guid: {0} | Name: {1} | LastModificationDate: {2}",
            node.Guid,
            node.Name,
            node.LastModificationDate);
    }
    else
        Console.WriteLine("Guid: {0} | Name: {1} | Document type: {2} | File type: {3} | Extension: {4} | Size: {5} | LastModificationDate: {6}",
            node.Guid,
            node.Name,
            node.DocumentType,
            node.FileType,
            node.Extension,
            node.Size,
            node.LastModificationDate);
}


Load file list for custom path

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";

// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);

// Load file list for custom path
FileListOptions options = new FileListOptions(@"D:\");
FileListContainer container = imageHandler.GetFileList(options);
foreach (var node in container.Files)
{
    if (node.IsDirectory)
    {
        Console.WriteLine("Guid: {0} | Name: {1} | LastModificationDate: {2}",
            node.Guid,
            node.Name,
            node.LastModificationDate);
    }
    else
        Console.WriteLine("Guid: {0} | Name: {1} | Document type: {2} | File type: {3} | Extension: {4} | Size: {5} | LastModificationDate: {6}",
            node.Guid,
            node.Name,
            node.DocumentType,
            node.FileType,
            node.Extension,
            node.Size,
            node.LastModificationDate);
}


Load file list for custom path with order

// Setup GroupDocs.Viewer config
ViewerConfig config = new ViewerConfig();
config.StoragePath = @"C:\storage";

// Create image handler
ViewerImageHandler imageHandler = new ViewerImageHandler(config);

// Load file list sorted by Name and ordered Ascending for custom path
FileListOptions options = new FileListOptions(@"D:\", FileListOptions.FileListSortBy.Name, FileListOptions.FileListOrderBy.Ascending);
FileListContainer container = imageHandler.GetFileList(options);
foreach (var node in container.Files)
{
    if (node.IsDirectory)
    {
        Console.WriteLine("Guid: {0} | Name: {1} | LastModificationDate: {2}",
            node.Guid,
            node.Name,
            node.LastModificationDate);
    }
    else
        Console.WriteLine("Guid: {0} | Name: {1} | Document type: {2} | File type: {3} | Extension: {4} | Size: {5} | LastModificationDate: {6}",
            node.Guid,
            node.Name,
            node.DocumentType,
            node.FileType,
            node.Extension,
            node.Size,
            node.LastModificationDate);
}