![]() |
VOOZH | about |
dotnet add package GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform --version 26.4.0
NuGet\Install-Package GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform -Version 26.4.0
<PackageReference Include="GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform" Version="26.4.0" />
<PackageVersion Include="GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform" Version="26.4.0" />Directory.Packages.props
<PackageReference Include="GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform" />Project file
paket add GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform --version 26.4.0
#r "nuget: GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform, 26.4.0"
#:package GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform@26.4.0
#addin nuget:?package=GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform&version=26.4.0Install as a Cake Addin
#tool nuget:?package=GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform&version=26.4.0Install as a Cake Tool
GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform is a cross-platform self-hosted API implementation for GroupDocs.Viewer.UI that enables document viewing using GroupDocs.Viewer for .NET cross-platform version. It provides a local, self-contained solution for document viewing that works across different operating systems.
This package uses the GroupDocs.Viewer.CrossPlatform NuGet package which provides a cross-platform graphical engine that works reliably on Linux and other operating systems. For Linux deployments, this package is the recommended choice over the Windows-optimized GroupDocs.Viewer.UI.SelfHost.Api.
To use GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform in your ASP.NET Core project:
dotnet add package GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform
Startup class:using GroupDocs.Viewer.UI.Core;
var builder = WebApplication.CreateBuilder(args);
var viewerType = ViewerType.HtmlWithEmbeddedResources;
builder.Services
.AddGroupDocsViewerUI();
builder.Services
.AddControllers()
.AddGroupDocsViewerSelfHostApi(config =>
{
config.SetViewerType(viewerType);
config.SetLicensePath("GroupDocs.Viewer.lic"); // Path to the license file
// Configure view options
config.ConfigureHtmlViewOptions(options => {
// Configure HTML view options
});
config.ConfigurePngViewOptions(options => {
// Configure PNG view options
});
config.ConfigureJpgViewOptions(options => {
// Configure JPG view options
});
config.ConfigurePdfViewOptions(options => {
// Configure PDF view options
});
// Configure internal caching
config.ConfigureInternalCaching(options => {
// Configure caching options
});
})
.AddLocalStorage("./Files");
var app = builder.Build();
app
.UseRouting()
.UseEndpoints(endpoints =>
{
endpoints.MapGroupDocsViewerUI(options =>
{
options.UIPath = "/viewer";
options.ApiEndpoint = "/viewer-api";
});
endpoints.MapGroupDocsViewerApi(options =>
{
options.ApiPath = "/viewer-api";
});
});
await app.RunAsync();
The CrossPlatform SelfHost API implementation provides the following configuration options:
LicensePath (Optional): Path to your GroupDocs.Viewer license file.ViewerType (Optional): The type of viewer to use. Options include:
HtmlWithEmbeddedResources (default)HtmlWithExternalResourcesPngJpgYou can configure specific view options for different output formats:
config.ConfigureHtmlViewOptions(options => {
// Configure HTML view options
});
config.ConfigurePngViewOptions(options => {
// Configure PNG view options
});
config.ConfigureJpgViewOptions(options => {
// Configure JPG view options
});
config.ConfigurePdfViewOptions(options => {
// Configure PDF view options
});
The internal caching mechanism stores rendered pages and document information in memory to improve performance:
The cache can be configured via the options shown in the example:
// Configure internal caching
config.ConfigureInternalCaching(options => {
// Configure caching options
options.DisableInternalCache(); // Disables internal caching
options.SetCacheEntryExpirationTimeoutMinutes(60); // Default values is 5 minutes
});
This implementation is designed to work across different operating systems:
When using GroupDocs.Viewer.UI.SelfHost.Api.CrossPlatform:
This project is licensed under the MIT License - see the file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.4.0 | 120 | 4/29/2026 |
| 26.3.0 | 162 | 3/4/2026 |
| 8.1.5 | 123 | 2/19/2026 |
| 8.1.4 | 116 | 2/13/2026 |
| 8.1.3 | 120 | 2/11/2026 |
| 8.1.2 | 475 | 11/17/2025 |
| 8.1.1 | 276 | 9/21/2025 |
| 8.0.7 | 617 | 5/23/2025 |
| 8.0.6 | 248 | 5/5/2025 |
| 8.0.5 | 217 | 4/23/2025 |
| 8.0.4 | 249 | 4/22/2025 |
| 8.0.3 | 211 | 4/4/2025 |
| 8.0.2 | 190 | 2/6/2025 |
| 8.0.1 | 202 | 12/20/2024 |
| 8.0.0 | 203 | 12/16/2024 |
| 6.0.9 | 218 | 4/4/2025 |
| 6.0.8 | 555 | 3/25/2025 |
| 6.0.7 | 243 | 12/2/2024 |
| 6.0.6 | 189 | 11/7/2024 |
| 6.0.5 | 258 | 9/30/2024 |