Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, February 16, 2017 9:51:30 AM(UTC)

maneka  
maneka

Groups: Registered
Posts: 17

Thanks: 1 times

Hello,

I am trying to load a url with an image into a documetnviewer
The code is as follows

Code:

 var url = 'http://test/_hires/test.jpg';
                lt.Documents.DocumentFactory.loadFromUri(url, null)
                   .done(function (document) {
                     
                       $scope.documentViewer.setDocument(document);

                   })
                   .fail(function (jqXHR, statusText, errorThrown) {
                    alert("Error loading document: " + errorThrown);
                });

the image is coming from a virtual directory.
the issue is that the loading of the document always fails with the error not found and this is because it is looking for a non existent controller action within my application which ends with

Factory/LoadFromUri

Any help provided is appreciated

thank you
maneka
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, February 17, 2017 9:15:59 AM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 218

Was thanked: 12 time(s) in 12 post(s)

Hello Maneka,

Can you confirm that you have the Document Service running? The LoadFromURI method is defined in the FactoryController.cs and is that is used by the DocumentViewer to actually load the document.

A simple test to see if the DocumentService is running is to Ping the service using the Ping method:

Quote:
http://localhost:19000/api/Test/Ping


Where 19000 is the port you are hosting your service on.

If you are wanting to host the Document Service as an external service and not have it as part of the same project, you can follow the forum post here:

https://www.leadtools.co...-MVC-as-external-service

Please let me know if you have any further questions regarding this!

Thank you
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.047 seconds.