I am using Visual Studio 2013, ASP.NET 4.5 MVC 5, LEADTOOLS v19. The steps listed assumes you already have our SDK installed and the document service set up properly.
I added a simple version of our document viewer to an MVC project. For my project, I have added annotations and the ability to enter a URL for another document.
But if you want to start from scratch you can do the following.
Steps:
1.Create a default Asp.Net MVC app using Visual Studio
2.Create a folder at root, I called mine ‘libs’, add our mentioned Javascript libraries to the folder you created. I also created a separate JS file called App.js instead of doing an inline script.
3. Create a new view in home I called mine "DocumentViewer".
4.Go to your HomeController and add a ActionResult for this view( public ActionResult DocumentViewer(){ return View(); })
5. Following the example at:
https://www.leadtools.co...s.ui.documentviewer.html
Add the html to the DocumentViewer.cshtml view you just made. Leave out any html, head, or body tags since they are already in the layout shared view.
6. Add a "@section scripts { }" put all of your scripts here and prepend their path with a '~' e.g()
7. Take the css and put it in a separate file in the Content folder.
8. Go to your BundleConfig.cs and add it to the stylebundle include so it will be included with the rest of the css.
9. Go to project properties -> web -> Servers section and set it to IIS so that we don't have any CORS issues with our document service.
10. Lastly, go to the shared view _Layout.cshtml and add <li>@Html.ActionLink("DocumentViewer", "DocumentViewer", "Home")</li> to the navbar so that you have a link to your document viewer page.
Now you should be able to build, run, and play with our document viewer!