Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to integrate Groupdocs viewer in .Net core and View the document in Angular 7 #8

Closed
SriAzureDev opened this issue Aug 30, 2020 · 6 comments

Comments

@SriAzureDev
Copy link

Hi,

I have a requirement that i have document stream in Sql sever and using WebAPI i will be retrieving from the database and would like to pass that stream to Angular UI in order to display in the browser. I looked at the solutions which has been provided but I could not able to understand how to display them in UI using Angular 7. It would be great if you can provide us the sample solution, so that we can try to purchase to license and integrate the same in our application. Awaiting for you'r reply/

@atirtahirgroupdocs
Copy link

@SriAzureDev

Please explore this basic demo project - viewer_angular.zip.

A quick overview

  1. PageController.cs - the API controller that returns page content (it takes a stream/byte[] as input, renders it to HTML view and return output stream)
  2. home.component.ts - component code
  3. home.component.html - component markup

You can further look at groupdocs.examples.angular npm (a simple Angular app that allows you to display documents) and here's how to use it.

@SriAzureDev
Copy link
Author

Hi,

I had looked at the code and one quick question, does it always should be viewed from iframe? so how does the works in Angular, it would be great if you can provide me a solution with using gd-viewer.

@atirtahirgroupdocs
Copy link

atirtahirgroupdocs commented Sep 1, 2020

@SriAzureDev

It depends on what output format (e.g. PDF, Image, HTML) you're going to convert source file. When the output format is HTML then the simplest way would be embedding each page in the iframe as it enables you to embed complete HTML document. When the output format is JPEG or PNG you can use img tag.
Please clone or download project here.

@shahzad-latif
Copy link
Contributor

The related project can be viewed here Display documents from a MemoryStream in ASP.NET MVC/.NET Core

@Framework-Support
Copy link

Hi Team,

To the above angular project, I am looking out for an example with Angular having options of Search, View, Merge, download, navigate , add comments, print. It would be great if you can provide me such example. As the example with angular is little confusing from the groupdocs total angular.

It is an urgent requirement and based on that we would like purchase the license asap.

@atirtahirgroupdocs
Copy link

@Framework-Support
We have assisted this query on forum. Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants