Free Support Forum - groupdocs.com

Problem keeping GroupDocs.Viewer and GroupDocs.Annotations on same project


#1

I’m trying to keep both GroupDocs.Annotations and GroupDocs.Viewer on the same project, but I thing that GroupDocs.Viewer classes and another files are base resources to build GroupDocs.Annotations, am I right?


Because I’m having problem on GetHtmlResourcesHandlerServlet when it calls viewerHandler.getHtmlResourcesHandler(). It seems that class com.groupdocs.viewer.handlers.ViewerHandler exists on both libraries:
  • On GroupDocs.Viewer, the method getHtmlResourcesHandler has 5 parameters (String, String, Integer, String, HttpServletResponse)
  • On GroupDocs.Annotations’ this method has 2 parameters (String, HttpServletResponse)
  • When I use GroupDocs.Viewer to open files, but using the ViewerHandler which belongs to GroupDocs.Annotations (passing filePath and request), I got Javascript errors like on image attached on this message
I’m planing to use GroupDocs.Viewer on cases where I have to just show images or documents, and GroupDocs.Annotations where I have to use annotations on documents.

Is there a straightforward way to do it?

Thank you.

#2
Hello Rafael,

Yes you are right, our GroupDocs.Annotation for Java is including in itself the classes of the GroupDocs.Viewer for Java , but the version of viewer, at this moment is less and is 2.9.0. If you use the GroupDocs.Viewer for Java 2.9.1, then you can see the difference in the parameters in the method getHtmlResourcesHandler.

Also you can disable the annotation tools and use the GroupDocs.Annotation for Java as simple viewer . For how to do it, please check the documentation of the script loader helper parameters here and the documentation of JavaScript widget methods here.

Best regards
Evgen Efimov

http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+