We are trying to implement GroupDocs viewer in .Net 6.0 as a backend and Angular for Frontend.
We couldn’t understand how document will get render in viewer. We want viewer in Angular so we will process files in backend then will pass it to the angular application which will show that document in viewer.
any help on priority appreciate.
Thanks.
@Suraj1992
Have you tried one of our demo projects e.g. ASP.NET Core Demo? Please also check How to integrate GroupDocs.Viewer in ASP.NET Core Web app documentation article.
You can think of GroupDocs.Viewer as a function that accepts a file on the input and produces multiple HTML, PNG, JPEG or single PDF file on the output.
Please consider the following code snippet that will load and convert sample.docx
file to HTML.
using (Viewer viewer = new Viewer("sample.docx"))
{
HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
viewer.View(viewOptions);
}
HTML files will be saved in the current directory. Each HTML file will represent a page in sample.docx
file.
I have go through the above step. I want to know how the connection will work from backend to frontend?
AspNETCoreDemo is for backend which we are able to run.
We are Interested in your product and evaluating it, but few things are not clear. It would be great if we have sample which is implemented based on .NET 5.0/6.0 and angular.
@Suraj1992
The backend is actually Web API. In case you’re looking for more details you you can find the example in ViewerController.cs from GroupDocs.Viewer-for-.NET-UI repository. The Angular App can be found in the client folder of the same repository.
You can check this sample app from the same repository that is targetting .NET Core App 3.1 but it should work the same when targetting .NET 5 and .NET 6.