Cross-platform viewer

When we buy .NET version of the product, does it include Java version as well or should it be bought separately?

I’m asking because our app will be cross-platform so wondering what is the best option for this. We are testing with .NET version currently, but going to port to Linux later, so thinking about Java vs Mono.

Does .NET version work on Mono? Also, in terms of functionality - are they the same or one is ahead?

@eugenekr

The .NET version of the product does not include Java version and it should be bought separately.

We can’t guarantee that .NET version will work on Mono as we’re focused on .NET Core support. The .NET Viewer is being tested on Linux targeting .NET Core. The Linux support is our top priority.

The .NET version is always ahead of Java. The Java version is a port of .NET and there is a time lag between them.

Both versions are cross-platform. What to choose is depends on the app type that you’re developing and your requirements.

Please let us know if you have any questions.
Have a nice day!

1 Like

Hi,

We have bought GroupDocs.Total product and trying to implement your viewer feature.
We have successfully upload the file to Linux server (centos), and want to preview the file in our web application through API as the backend. Our development environment is Windows base OS and .NetCore 3.1. What is the best practise to do this?
Can we also view the file using groupdocs viewer ui ?

Thank You in advance!

@teguhmargaretha2010

Thank you for your interest in GroupoDocs.Viewer!

You can get started with the ASP.NET Core Demo app. Since your development environment is Windows you can follow these steps to run the app:

  • Clone the repository with demos git clone git@github.com:groupdocs-viewer/GroupDocs.Viewer-for-.NET.git
  • Navigate in .\Demos\ASP.NET Core\src\ folder
  • Run the app by executing dotnet run
  • Navigate to https://localhost:8081/viewer in your browser to open the app

Optionally you can set a license in the Startup.cs file by uncommenting line with config.SetLicensePath("c:\\licenses\\GroupDocs.Viewer.lic"); and updating the path.

You can also find more information about GroupDocs.Viewer.UI at GitHub - groupdocs-viewer/GroupDocs.Viewer-for-.NET-UI: UI - User Interface for GroupDocs.Viewer for .NET document viewer and automation API..

Please let us know if you’re going to publish the app to Linux as it requires additional dependencies to be installed.

Hi,

Thank you for your feedback!
I have already cloned the repo and go into the example code.

Yes we are going to publish both the API and the web application to Linux.

@teguhmargaretha2010

Ok, let us know if you have any issues with running the demos and we’ll try assisting you.

Please check .NET Standard 2.0 API Limitations article that lists all the additional dependencies. I’ve also added the Dockerfile that can be used to run ASP.NET Core Demo in Docker container. Here is the listing of the Dockerfile

# syntax=docker/dockerfile:1

# How to build and run this demo in Docker container
# 1. To build execute `docker build -t groupdocs-viewer:aspnetcore-demo .`
# 2. To run execute `docker run -d -p 8080:80 --name viewer-demo groupdocs-viewer:aspnetcore-demo`
# 3. Navigete to <http://localhost:8080/viewer> in your browser

FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore

# Copy everything else and build
COPY ./ ./
RUN dotnet publish -c Release -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:3.1-bionic
WORKDIR /app
COPY --from=build-env /app/out .

# begin install libgdiplus and dependencies
RUN apt-get update \
    && apt-get install -y \
        apt-transport-https \
        dirmngr \
        gnupg \
        ca-certificates

RUN 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

RUN apt-get update \
    && apt-get install -y --allow-unauthenticated \
        libc6-dev \
        libgdiplus \
        libx11-dev
# end install libgdiplus and dependencies

# begin ttf-mscorefonts-installer
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections \
	&& apt-get update \
    && apt-get install -y \
        libfontconfig1 \
        xfonts-utils \
		ttf-mscorefonts-installer
# end ttf-mscorefonts-installer

ENTRYPOINT ["dotnet", "GroupDocs.Viewer.AspNetCore.dll"]

This Dockerfile uses Ubuntu-based image with .NET Core 3.1 runtime.