A virtual document is a collection of any combination of documents or pages of documents displayed as a single multi-page document with a single set of thumbnails. The pages can be from documents of different file format types such as AFP, Word, or PDF. The virtual document is viewed and regarded as any normal document would be.

Please note the following:

  • Exporting to a .tif may require significant resources especially if converting to 24-bit color.
  • Virtual Documents export only to .tif because the virtual documents may be a mix of multiple formats.
  • If you are viewing all pages in a single document, you should not use Virtual Documents.
  • Document Notes is not supported in Virtual Documents.

Loading Virtual Documents

To pass a number of documents to the viewer, the value of a documentId can start with a special identifier, followed by a string of a comma-separated list of documentIds. The list is issued to create the virtual document. The documentIds are listed in the order in which the documents are to be compiled for viewing.

Virtual Document Syntax

The special identifier is the string VirtualDocument: which is then followed by any number of documentIds. The syntax can be used any time a normal documentId could be used. A documentId in the comma-separated list may be specified in the following manner.

File Name Description
ABC.tif This specifies that all pages of the document should be included.
ABC.tif[2] This specifies that only a single page from the document should be included.
ABC.tif[1-3] This specifies that a range of pages from the document should be included.

Note: To include non-consecutive pages from a single document, you need to specify the document each time in the virtual document string.

Displaying a Virtual Document

Virtual documents are displayed based upon parameters in the URL. For example, suppose that you have three documents, ABC.tif, EFG.pdf, and IJK.doc, each with three pages. You can create a virtual document from the entirety of all three documents:

http://localhost:8080/virtualviewer/index.html?documentId=VirtualDocument:ABC.tif,EFG.pdf,IJK.doc

Based upon the parameters described above, we know that we are displaying the entire contents of the original documents in our virtual document. If we wanted to include (for example) the full texts of ABC.tif and IJK.doc but only page two of EFG.pdf, we would enter:

http://localhost:8080/virtualviewer/index.html?documentId=VirtualDocument:ABC.tif,EFG.pdf[2],IJK.doc

Finally, if we wanted to include a range of pages from ABC.tif, the full EFG.pdf, and only page 3 from LJK.doc, we would enter:

http://localhost:8080/virtualviewer/index.html? documentId=VirtualDocument:ABC.tif[1-2],EFG.pdf,LJK.doc[3]

Virtual Documents: Save Document As

When a user prints, exports, emails, or uses Save Document As with a virtual document, the resulting document will reflect what the user sees on their screen at the time of execution.

Please note that sendDocument is not supported in virtual documents. A work around is to send a virtual document with Save Document As. Save Document As has better functionality than sendDocument.

The loadVirtualDocumentAnnotations and saveVirtualDocumentAnnotations web.xml parameters enables virtual documents to read annotations from the source document and to save annotations created on the virtual documents back to the source document. The default values for both parameters are set to false.

Printing Virtual Documents

To print a virtual document, select the Print button.