Free Support Forum - groupdocs.com

Best way to use GroupDocs.Viewer without generating automatic scripting


#1

I was having troubles installing GroupDocs.Viewer using the automatic script generation – ViewerHandler.getViewerScript() and ViewerHandler.getHeader() methods. I use JSF, wich cames with jQuery, and this conflicts with the inclusion of jQuery provided with GroupDocs.


So, I opened the Java Web Sample Viewer project, configured it to work on my environment, open the generated viewer on the web page and copied the generated HTML and scripts.
  • Is this the right way to use it?
  • Is there some documentation that explains how to solve conflicts with libraries like jQuery and jQuery-UI?
  • Should I save the JS and CSS files requested for the application (through /GetJsServlet and /GetCssServlet servlets) on my project to load it without invoking these servlets? Is there a problem doing that?
I attached the generated files.

Thank you.

#2

Hello Rafael,


Thank you for your interest in the GroupDocs.Viewer for Java. Yes, your way is one of the correct ways. You can use, as the servlets, or you can copy the generated HTML and scripts, but you should know that the scripts and the HTML can be changed in the new release of the Viewer and then you will need to update these.
You can check our documentation for how to integrate in the GroupDocs.Viewer for Java into the PHP Web App here as the example.

The jQuery API is very flexible, to solve the conflicts you can use the method jQuery.noConflict(), also you can check here for how to resolve two jQuery conflicts .

Best regards

Evgen Efimov


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