1
How to load the GleamTech document viewer within an Angular component?
Question asked by Viren Kapadia - 5/7/2024 at 8:49 AM
Answered

This post is regarding ticket # 121-2DAB90CE-0304 submitted on 4/12

 

We are using DocumentUltimate v6.0.0.0 in our product.

We need a way to load the GleamTech document viewer within an Angular component.

I reviewed your existing implementation which uses the HtmlHelper extension method named RenderHead(Model) which renders JavaScript links and points to your HTTP handler. Also, DocumentViewer.document is loading within the iframe.

Can you please provide me the name of any GleamTech class or interface that I can use to produce JavaScript links on the controller rather than using HtmlHelper extensions?

Also, is it possible to provide source code so that we can make custom changes according to our requirements? We are ready to sign the NDA if needed. Feel free to post a response here or in the ticket indicated above.

2 Replies

Reply to Thread
0
Viren Kapadia Replied
Any update on this ticket?
0
Cem Alacayir Replied
Employee Post Marked As Answer
Angular or React are JS frameworks so once you use them, all of your components should be a Angular or React components. DocumentViewer has a JS part but it also has a server part, it's an ASP.NET component.

Your best bet would be this:

1. Create a page which hosts DocumentViewer in ASP.NET. This page should receive important parameters like the document to display in querystring, e.g. myViewer?doc=SomeIdOrName.pdf

2. In angular, render an <iframe> which points to your page, e.g.
<iframe src="myViewer?doc={{docName}}"
The url of your page would probably be a static full url, just like a cdn e.g www.contoso.com/myApp/myViewer?doc so that you can always access it in your JS project.

By the way, very soon we will release a remake version of DocumentViewer and we plan to offer JS part as React, Angular, Vue etc. component. However the JS part will only display PDF files because conversion from other doc formats to PDF is only possible in ASP.NET component.

Reply to Thread