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 : Monday, November 30, 2015 6:46:31 AM(UTC)

NathanM  
Guest

Groups: Guests
Posts: 3,049

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

Attached is a simple version of our latest document viewer which no longer uses rest services but instead is a self contained ASP.NET MVC project. The attached doesn't touch any server code, instead is a separate project on your server that uses the self contained MVC project as a external service and allows you to easily create your own UI.



Steps:

1. Open the local DocumentViewer(\LEADTOOLS 19\Examples\JS\DocumentViewer) in visual studio(as admin)

2. Go to project properties

3. Go to web tab

4. Under Servers, switch it from IIS Express to local IIS, then press 'create virtual directory'(http://localhost/WebApp)

5. unzip my project into the root of your IIS(c:\inetpub\wwwroot)

6. browse to http://localhost/newdocumentviewer

optional: You can remove the App folder from the DocumentViewerDemo that you put on your server since it's the client side code. But I recommend using a separate copy for this since it will destroy the DocumentViewerDemo's usability as a Document Viewer.



The reason we have to switch to local IIS is because our document server and client have to be served on the same port. At the very beginning of app.js I set the path to the server using https://www.leadtools.com/help/leadtools/v19/dh/javascript/to/leadtools.topics.documents~dox.topics.documents_application.html



If you want to name the server-side portion of your code something else than WebApp or want a slightly different folder structure then you will need to modify these accordingly.



The simple version of the document viewer is based off of our sample code on the website, with separation of code and some added functionality and styles.

https://www.leadtools.com/help/leadtools/v19/dh/javascript/doxui/leadtools.documents.ui~leadtools.documents.ui.documentviewer.html



The style sheets "imageviewerstyles.css" and "thumbnailstyles.css" are taken from the document viewer demo to style thumbnails, and document if you have useElements set to true(default). Because it's not one solid canvas and each element has its own divs and img tags, the styling has to be done from the client side, this can be modified to your liking.



Additional info about the elements when useElements is set to true:

https://www.leadtools.com/help/leadtools/v19/dh/javascript/to/leadtools.topics.controls~c.topics.imageviewer_elementsmode.html

https://www.leadtools.com/help/leadtools/v19/dh/javascript/c/leadtools.controls~leadtools.controls.imageviewercreateoptions~elementsmodeoptions.html

https://www.leadtools.com/help/leadtools/v19/dh/javascript/c/leadtools.controls~leadtools.controls.imageviewercreateoptions~useelements.html%lt;/install_dir>
File Attachment(s):
NewDocumentViewer.zip (369kb) downloaded 134 time(s).


LEADTOOLS Support
LEAD Technologies, Inc.

LEAD Logo

Edited by moderator Tuesday, October 18, 2016 11:42:03 AM(UTC)  | Reason: Not specified

 

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 : Monday, March 7, 2016 7:55:55 AM(UTC)

NathanM  
Guest

Groups: Guests
Posts: 3,049

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

See also:
HOWTO: Print From HTML5 DocumentViewer

Edited by moderator Tuesday, October 18, 2016 11:43:38 AM(UTC)  | Reason: Updated link

 
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-2018, Yet Another Forum.NET
This page was generated in 0.204 seconds.