Many customers create a custom content handler class that integrates with their document management and security systems.

The Content Handler APIS are now documented in our Javdocs located on our website Snowbound Documentation - Content Handler API.

Once you have created your custom content handler and place it in VirtualViewer’s Java classpath you can specify its location via the contentHandlerClass parameter. It can be found in the web.xml file in the WEB-INF folder.

<init-param>
  <param-name>contentHandlerClass</param-name>
  <param-value>com.mycompany.viewer.DocumentContentHandler</param-value>
</init-param>

VirtualViewer would then look for and invoke your custom content handler at ./WEB-INF/com/mycompany/viewer/DocumentContentHandler.class.

Using the Sample FileContentHandler

Packaged with VirtualViewer® is a source code sample for a basic fileContentHandler. It can be found in the VirtualViewer Java v5.7.0\sample-code\Java Content Handler folder. It is provided as a starting point for your own content handler and not meant for use in production.

Notes for Starting your custom FileContentHandler

ContentHandlerInput and ContentHandlerResult

Every public Content Handler method accepts ContentHandlerInput and returns ContentHandlerResult

ContentHandlerInterface

The ContentHandlerInterface must be implemented in your custom FileContentHandler.

Additional interfaces

You can use additional Content Handler Interfaces to make use of more features in VirtualViewer®.