GroupDocs.Comparison.UI 6.0.21

dotnet add package GroupDocs.Comparison.UI --version 6.0.21
                    
NuGet\Install-Package GroupDocs.Comparison.UI -Version 6.0.21
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GroupDocs.Comparison.UI" Version="6.0.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GroupDocs.Comparison.UI" Version="6.0.21" />
                    
Directory.Packages.props
<PackageReference Include="GroupDocs.Comparison.UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GroupDocs.Comparison.UI --version 6.0.21
                    
#r "nuget: GroupDocs.Comparison.UI, 6.0.21"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GroupDocs.Comparison.UI@6.0.21
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GroupDocs.Comparison.UI&version=6.0.21
                    
Install as a Cake Addin
#tool nuget:?package=GroupDocs.Comparison.UI&version=6.0.21
                    
Install as a Cake Tool

UI for GroupDocs.Comparison for .NET

Build Packages

GroupDocs.Comparison.UI

GroupDocs.Comparison UI is a rich UI interface that designed to work in conjunction with GroupDocs.Comparison for .NET to compare file and document formats in a browser.

To integrate GroupDocs.Comparison UI in your ASP.NET Core project you just need to add services and middlewares into your Startup class that provided in GroupDocs.Comparison.UI and related packages.

Include packages in your project:

dotnet add package GroupDocs.Comparison.UI
dotnet add package GroupDocs.Comparison.UI.SelfHost.Api
dotnet add package GroupDocs.Comparison.UI.Api.Local.Storage
dotnet add package GroupDocs.Comparison.UI.Api.Local.Cache

Add configuration to your Startup class:

using GroupDocs.Comparison.UI.Core;
using GroupDocs.Comparison.UI.Extensions;

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services
            .AddGroupDocsComparisonUI(config =>
            {
                config.SetFilesDirectory("./Files");
            });

        services
            .AddControllers()
            .AddGroupDocsComparisonSelfHostApi(config =>
            {
                //Trial limitations https://docs.groupdocs.com/comparison/net/licensing-and-evaluation-limitations/
                //Temporary license can be requested at https://purchase.groupdocs.com/temp-license/100078
                //config.SetLicensePath("c:\\licenses\\GroupDocs.Comparison.lic"); // or set environment variable 'GROUPDOCS_LIC_PATH'
            })
            .AddLocalStorage("./Temp")
            .AddLocalCache("./Cache");
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        app
            .UseRouting()
            .UseEndpoints(endpoints =>
            {
                endpoints.MapGroupDocsComparisonUI(options =>
                {
                    options.UIPath = "/comparison";
                    options.APIEndpoint = "/comparison-api";
                });

                endpoints.MapGroupDocsComparisonApi(options =>
                {
                    options.ApiPath = "/comparison-api";
                });
            });
    }
}

Or, if you’re using new program style with top-level statements, global using directives, and implicit using directives the Program.cs will be a bit shorter.

using GroupDocs.Comparison.UI.Core;
using GroupDocs.Comparison.UI.Extensions;

var builder = WebApplication.CreateBuilder(args);

builder.Services
   .AddGroupDocsComparisonUI(config =>
   {
       config.SetFilesDirectory("./Files");
   });
   
builder.Services
   .AddControllers()
   .AddGroupDocsComparisonSelfHostApi(config =>
   {
       //Trial limitations https://docs.groupdocs.com/comparison/net/licensing-and-evaluation-limitations/
       //Temporary license can be requested at https://purchase.groupdocs.com/temp-license/100078
       //config.SetLicensePath("c:\\licenses\\GroupDocs.Comparison.lic"); // or set environment variable 'GROUPDOCS_LIC_PATH'
   })
   .AddLocalStorage("./Temp")
   .AddLocalCache("./Cache");

var app = builder.Build();

app
    .UseRouting()
    .UseEndpoints(endpoints =>
    {
        endpoints.MapGroupDocsComparisonUI(options =>
        {
            options.UIPath = "/comparison";
            options.APIEndpoint = "/comparison-api";
        });

        endpoints.MapGroupDocsComparisonApi(options =>
        {
            options.ApiPath = "/comparison-api";
        });
    });

await app.RunAsync();

This code registers /comparison middleware that will serve SPA and /comparison-api middleware that will serve content for the UI to display.

Please note that Comparison does not create Files and Temp folders, please make sure to create Files and Temp folders manually before running the application.

UI

The UI is Angular SPA that is build upon @groupdocs.examples.angular/comparison package. You can change the path where the SPA will be available by setting UIPath property e.g.

endpoints.MapGroupDocsComparisonUI(options =>
{
    options.UIPath = "/my-comparison-app";
});

API

The API is used to serve content such as information about a document, document pages in HTML/PNG/JPG format and PDF file for printing. The API can be hosted in the same or a separate application. The following API implementations available at the moment:

  • GroupDocs.Comparison.UI.SelfHost.Api

All the API implementations are extensions of IMvcBuilder:

Self-Host

Self-Host API uses GroupDocs.Comparison for .NET to convert documents to HTML, PNG, JPG, and PDF. All the conversions are performed on the host where the application is running.

services
    .AddControllers()
    .AddGroupDocsComparisonSelfHostApi();

GroupDocs.Comparison for .NET requires license to skip trial limitations. A temporary license can be requested at Get a Temporary License.

Use the following code to set a license:

services
    .AddControllers()
    .AddGroupDocsComparisonSelfHostApi(config =>
    {
        config.SetLicensePath("./GroupDocs.Comparison.lic");
    })
Linux dependencies

When running Self-Host API on Linux the following packages have to be installed:

  • apt-transport-https
  • dirmngr
  • gnupg
  • libc6-dev
  • libgdiplus
  • libx11-dev
  • ttf-mscorefonts-installer

As an example the following commands should be executed to install the dependencies on Ubuntu 18.04.5 LTS (Bionic Beaver):

  • apt-get update
  • apt-get install -y apt-transport-https
  • apt-get install -y dirmngr
  • apt-get install -y gnupg
  • apt-get install -y ca-certificates
  • apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $ 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  • echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic $ main" >> /etc/apt/sources.list.d/mono-official-stable.list
  • apt-get update
  • apt-get install -y --allow-unauthenticated libc6-dev libgdiplus libx11-dev
  • apt-get install -y ttf-mscorefonts-installer

API Storage Providers

Storage providers are used to read/write file from/to the storage. The storage provider is mandatory.

  • GroupDocs.Comparison.UI.Api.Local.Storage

All the storage providers are extensions of GroupDocsComparisonUIApiBuilder:

Local Storage

To render files from your local drive use local file storage.

services
    .AddControllers()
    .AddGroupDocsComparisonSelfHostApi()
    .AddLocalStorage("./Files");

API Cache Providers

In case you would like to cache the output files produced by GroupDocs.Comparison you can use one of the cache providers:

  • GroupDocs.Comparison.UI.Api.Local.Cache

All the cache providers are extensions of GroupDocsComparisonUIApiBuilder:

Local Cache
services
    .AddControllers()
    .AddGroupDocsComparisonSelfHostApi()
    .AddLocalStorage("./Files")
    .AddLocalCache("./Cache");

Contributing

Your contributions are welcome when you want to make the project better by adding new feature, improvement or a bug-fix.

  1. Read and follow the Don't push your pull requests
  2. Follow the code guidelines and conventions.
  3. Make sure to describe your pull requests well and add documentation.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.0.21 0 11/18/2025
6.0.20 0 11/18/2025
6.0.18 0 1/31/2025
6.0.17 0 12/31/2024
6.0.16 0 11/29/2024
6.0.15 0 10/31/2024
6.0.14 0 9/30/2024
6.0.13 1 9/2/2024
6.0.12 2 7/30/2024
6.0.11 1 7/2/2024
6.0.10 1 5/31/2024
6.0.9 3 4/30/2024
6.0.8 1 3/29/2024
6.0.7 2 3/1/2024
6.0.6 2 1/31/2024
6.0.5 3 12/15/2023
6.0.4 2 11/27/2023
6.0.3 3 11/1/2023
6.0.2 2 10/2/2023
6.0.1 3 6/29/2023
6.0.0 3 6/27/2023
1.0.0 2 6/26/2023