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, October 30, 2014 12:20:00 PM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 218

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

The attached HTML5 / JavaScript project shows how to use our Annotation in a multipage environment. Also attached is a modified Leadtools.RESTServices project that adds a method to the Raster.svc to allow annotation burning on the server side so that you can burn and save the entire multipage document and then send it to the client.

This project uses the AttachContainer method of the AnnAutomation to attach a separate container for each page of the document. Here is the documentation link for it:
https://www.leadtools.com/help/leadtools/v18/dh/javascript/aa/leadtools.annotations.automation~leadtools.annotations.automation.annautomation~attachcontainer.html

The flow of this application is:
  1. Initialize the viewer and annotations
  2. Load page 1 of the multipage image
  3. Get the total page count using the Raster.svc Info method
  4. Create an AnnContainer for each page and store them in an array
  5. Allow the navigation between the pages by loading the correct page using the Raster.svc Load method with the page number passed
  6. Attach the correct AnnContainer from the array of all the containers using the AttachContainer method of the AnnAutomation

When saving the document:

  1. Save each AnnContainer to a multipage XmlString using AnnCodecs.Save method
  2. Pass the XmlString to the Data.svc SaveXml method and get the path of the Annotation Xml file
  3. Pass the URL and the Xml path (from last step) to the new Raster.svc Save method
  4. On the server side, it will load each page of the image url and the xml file and burn them
  5. The resultant file path is then passed to the client side for download using the Data.svc Download method

To run this project do the following:

  1. Make sure to have IIS setup on your machine
  2. Run this exe to setup the REST services - C:\LEADTOOLS
    18\Shortcuts\HTML5\01 Document\01 Local Demos\10 Run This First To Configure Demos and Services
  3. Make sure that the services are setup correctly by Testing them on the
    final tab of the utility (if any errors occur, please click the 'Troubleshooting' button
  4. Extract the MultipageAnnotationDemo folder and move it to your 'C:\inetpub\wwwroot\' folder (iis localhost)
  5. Extract the Leadtools.RESTServices to your 'C:\LEADTOOLS 18\Examples\REST' folder and replace the one already there
  6. Open the 'Leadtools.RESTServices\Leadtools.RESTServices_AnyCPU_2010.sln' in Visual Studio and rebuild the DLL (it should output to 'C:\LEADTOOLS 18\Examples\REST\RESTServicesHost\Bin')
  7. Browse to the HTML file -http://localhost/MultipageAnnotationDemo/default.html
  8. Load any support multipage document and draw annotations on each page, click the 'Save Document' button to save the document + annotations to your machine

File Attachment(s):
MultipageAnnotationDemo.zip (355kb) downloaded 104 time(s).
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 

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 : Thursday, December 18, 2014 11:25:44 AM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 218

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

I have updated this project to work with v19 JavaScript and v19 .NET DLL in the REST service.

Follow all the same steps except:

To run this project do the following:

  1. Make sure to have IIS setup on your machine
  2. Run this exe to setup the REST services - C:\LEADTOOLS 19\Shortcuts\Annotation\JavaScript\10 Run This First To Configure Demos and Services
  3. Make sure that the services are setup correctly by Testing them on the
    final tab of the utility (if any errors occur, please click the 'Troubleshooting' button
  4. Extract the MultipageAnnotationDemo folder and move it to your 'C:\inetpub\wwwroot\' folder (iis localhost)
  5. Extract the Leadtools.RESTServices to your 'C:\LEADTOOLS 19\Examples\REST' folder and replace the one already there
  6. Open
    the 'Leadtools.RESTServices\Leadtools.RESTServices_AnyCPU_2010.sln' in Visual Studio and rebuild the DLL (it should output to 'C:\LEADTOOLS 19\Examples\REST\RESTServicesHost\Bin')
  7. Browse to the HTML file -http://localhost/MultipageAnnotationDemo19/default.html
  8. Load
    any support multipage document and draw annotations on each page, click
    the 'Save Document' button to save the document + annotations to your machine

File Attachment(s):
MultipageAnnotationDemo19.zip (543kb) downloaded 137 time(s).
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.094 seconds.