#1
Posted
:
Thursday, February 16, 2017 9:51:30 AM(UTC)
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/LoadFromUriAny help provided is appreciated
thank you
maneka
#2
Posted
:
Friday, February 17, 2017 9:15:59 AM(UTC)
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-servicePlease let me know if you have any further questions regarding this!
Thank you
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.
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.