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 Javadocs located on our website PrizmDoc® for Java Documentation - Content Handler API.

Once you have created your custom content handler and place it in PrizmDoc® for Java’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>

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

Using the Sample FileContentHandler

Packaged with PrizmDoc® for Java is a source code sample for a basic fileContentHandler. It can be found in the VirtualViewer5.13.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 PrizmDoc® for Java.

RESTful Content Handler Project Sample

PrizmDoc® for Java Ships with a RESTful content handler that provides a more flexible development and deployment process for customers.

Packaged in the latest version is a small Express server as a test/example for use with the RESTful content handler proof of concept. The content handler will call out to a server with RESTful http API calls, and this server will provide documents, annotations, notes, etc.

You will find this project in the sample-code/RESTful Content Handler Server Example folder of the PrizmDoc® for Java build. Please be sure to read the README.md for the most up to date instructions.