Using Multiple Documents Mode In VirtualViewer AJAX

Snowbound Software’s VirtualViewer® HTML5 Java document viewing product allows you to open multiple documents at the same time using one of three available multiple documents modes; viewed documents available documents and specified documents.

To open multiple documents in VirtualViewer® HTML5 Java, select the Docs tab located on the bottom of the thumbnail panel. From the Docs pane, simply left-click any document you would like to open in the main viewer. When a new document has been clicked in the Docs pane, it will display in the main viewer and have a new document tab created for it. You can select document tabs to display any open documents.

Setting Multiple Documents Mode to Viewed Documents

The viewed documents mode is used to add a new tab to the viewer each time a document is added. The first page thumbnail of each document is added at the bottom of the list in the Documents view of the thumbnail pane. Viewed documents mode is the default setting.

To set the multiple documents mode to view viewed documents, set the multipleDocMode parameter in the config.js file to viewedDocuments as shown in the following example:

var multipleDocMode = multipleDocModes.viewedDocuments;

If the multipleDocMode parameter is set to viewedDocuments, documents will be added to the set of documents as the user views them during the current session.

Setting Multiple Documents Mode to Available Documents

The available documents mode uses the getAvailableDocumentIds() method in the Content Handler to determine what documents are open in the viewer when it is launched.

To set the multiple documents mode to view available documents, set the multipleDocMode parameter in the config.js file to availableDocuments as shown in the following example:

var multipleDocMode = multipleDocModes.availableDocuments;

If the multipleDocMode parameter is set to availableDocuments, the getAvailableDocumentIds() is called in the Content Handler to populate the list of documents. For more information about the Content Handler, please see Chapter 4 – Working with the Content Handler in the VirtualViewer Java Content Server Administrator’s Guide.

Setting Multiple Documents Mode to Specified Documents

The specified documents mode is used to open up multiple documents when the viewer is first launched. The first page thumbnails of each documents specified are added to the Documents view of the thumbnail pane.

To set the multiple documents mode to view specified documents, set the multipleDocMode parameter in the config.js file to specifiedDocuments as shown in the following example:

var multipleDocMode = multipleDocModes.specifiedDocuments;

If the multipleDocMode parameter is set to specifiedDocuments, the system uses an array of documentIDs passed in as an array to myFlexSnap.initSpecifiedDocuments().

For example, in ajaxClient.html, set the following:

In config.js, set the following:

Var SD = new Array(“file1.ext”,“file2.ext”,“file3.ext”)

Category:

Online Demo