GroupDocs.Viewer for .NET 23.4 Release Notes

There are 9 features and bug fixes in this release.

Full list of changes in this release

KeyCategorySummary
VIEWERNET‑4212FeatureSupport for setting margins when exporting Excel Spreadsheets to PDF
VIEWERNET‑4312Feature[GroupDocs.Viewer.UI] Option to disable print
VIEWERNET‑4280Feature[GroupDocs.Viewer.UI] Check if license file exists in the application folder
VIEWERNET‑4324FixLinks are covered after rendering
VIEWERNET‑4322FixAI file can’t be opened in .NET project
VIEWERNET‑4318FixPPTX showing headers when ExcludeFonts
VIEWERNET‑4319FixViewer fails to open DIB file
VIEWERNET‑4328FixOneNote embedded drawing is missing
VIEWERNET‑4247FixCould not load System.Drawing.Common assembly in VB.NET project

Major Features

This release includes three features:

Support for setting margins when exporting Excel Spreadsheets to PDF

If convert from excel workbook to the Pdf now optional margins can be applied to the output pages. If margin value is less than 0 or not set then it will be set to the default value.

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

using (var viewer = new Viewer("invoice.xlsx"))
{
    var viewOptions = new PdfViewOptions();

    // Set margins for worksheets in the output pdf pages
    viewOptions.SpreadsheetOptions.LeftMargin = 0;
    viewOptions.SpreadsheetOptions.RightMargin = 0.5;
    viewOptions.SpreadsheetOptions.TopMargin = 1;
    viewOptions.SpreadsheetOptions.BottomMargin = -10; // set to default value

    viewer.View(viewOptions);
}

Option to disable print

GroupDocs.Viewer.UI Print button now can be disabled optionally from backend.

/// Implement the service
class MyUIConfigProvider : IUIConfigProvider
{
    public void ConfigureUI(Config config)
    {
        config.DisablePrint(); // use this function to disable print on UI
    }
}

...

// and register it
services.AddTransient<IUIConfigProvider, MyUIConfigProvider>();

Check if license file exists in the application folder

GroupDocs.Viewer.UI Check of license file in the application folder added.

Current sequence of checks:

  • check license file path
  • check path from GROUPDOCS_LIC_PATH environment variable
  • check app root folder for files with file names
    • GroupDocs.Viewer.lic
    • GroupDocs.Viewer.Product.Family.lic